Clean code
This commit is contained in:
parent
af7aef6d23
commit
5cac9659e5
|
|
@ -423,7 +423,7 @@ class IsWineryReviewer(IsStandardUser):
|
|||
rules = [
|
||||
super().has_object_permission(request, view, obj)
|
||||
]
|
||||
# AttributeError: 'Establishment' object has no attribute 'object_id'
|
||||
|
||||
if hasattr(obj, 'type_id') or hasattr(obj, 'establishment_type_id'):
|
||||
type_id: int
|
||||
if hasattr(obj, 'type_id'):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user