Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
abcbda53
Commit
abcbda53
authored
1 year ago
by
magicfelix
Browse files
Options
Downloads
Patches
Plain Diff
Fix group query by using queryset instead of object
parent
0a6875e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1300
Resolve "Group query fails in some cases (probably when queried by a member/owner)"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/core/schema/group.py
+2
-2
2 additions, 2 deletions
aleksis/core/schema/group.py
with
2 additions
and
2 deletions
aleksis/core/schema/group.py
+
2
−
2
View file @
abcbda53
...
...
@@ -39,7 +39,7 @@ class GroupType(DjangoObjectType):
if
has_person
(
info
.
context
.
user
)
and
[
m
for
m
in
root
.
members
.
all
()
if
m
.
pk
==
info
.
context
.
user
.
person
.
pk
]:
persons
=
(
persons
|
Person
.
objects
.
get
(
pk
=
info
.
context
.
user
.
person
.
pk
)).
distinct
()
persons
=
(
persons
|
Person
.
objects
.
filter
(
pk
=
info
.
context
.
user
.
person
.
pk
)).
distinct
()
return
persons
@staticmethod
...
...
@@ -48,7 +48,7 @@ class GroupType(DjangoObjectType):
if
has_person
(
info
.
context
.
user
)
and
[
o
for
o
in
root
.
owners
.
all
()
if
o
.
pk
==
info
.
context
.
user
.
person
.
pk
]:
persons
=
(
persons
|
Person
.
objects
.
get
(
pk
=
info
.
context
.
user
.
person
.
pk
)).
distinct
()
persons
=
(
persons
|
Person
.
objects
.
filter
(
pk
=
info
.
context
.
user
.
person
.
pk
)).
distinct
()
return
persons
@staticmethod
...
...
This diff is collapsed.
Click to expand it.
magicfelix
@magicfelix
mentioned in commit
fd1da2f4
·
1 year ago
mentioned in commit
fd1da2f4
mentioned in commit fd1da2f45c63414e376c7f828ea9d1d21f16b244
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment