Skip to content

Commit

Permalink
fix bug from linting
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Dec 10, 2024
1 parent a2a6eb8 commit a66ba7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpcontribs-api/mpcontribs/api/contributions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def has_add_permission(self, req, obj):
raise Unauthorized(f"Can't add {obj.identifier}: {msg}")

query = dict(project=obj.project.id, identifier=obj.identifier)
if obj.project.unique_identifiers and Contributions.objects(query).count():
if obj.project.unique_identifiers and Contributions.objects(**query).count():
raise Unauthorized(f"{obj.identifier} already added for {obj.project.id}")

return True
Expand Down

0 comments on commit a66ba7f

Please sign in to comment.