Skip to content

Commit

Permalink
Fix the Delta.Method enums to inherit str, so the string comparison w…
Browse files Browse the repository at this point in the history
…orks

This fix directly affects the permissions check for role reporter, which
were failing before, as `delta.method == Delta.Method.Create` was
returning false.
  • Loading branch information
suricactus authored and github-actions[bot] committed Mar 23, 2022
1 parent e99ffda commit 0e8d589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-app/qfieldcloud/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ def clean(self) -> None:


class Delta(models.Model):
class Method(Enum):
class Method(str, Enum):
Create = "create"
Delete = "delete"
Patch = "patch"
Expand Down

0 comments on commit 0e8d589

Please sign in to comment.