mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Don’t return UUID objects from the UUID convertor
Because it means you often have to cast to string in your application
code just to get your tests passing.
The method being monkey patched is originally defined here: b81aa0f18c/src/werkzeug/routing.py (L1272)
This commit is contained in:
@@ -234,7 +234,7 @@ class User(JSONModel, UserMixin):
|
||||
]
|
||||
|
||||
def belongs_to_service(self, service_id):
|
||||
return str(service_id) in self.service_ids
|
||||
return service_id in self.service_ids
|
||||
|
||||
def belongs_to_service_or_403(self, service_id):
|
||||
if not self.belongs_to_service(service_id):
|
||||
|
||||
Reference in New Issue
Block a user