Fix ==
-> isinstance
typo
This commit is contained in:
parent
2690e2550d
commit
84ac1e8257
@ -16,8 +16,8 @@ class PaperworkRouter:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def allow_relation(self, obj1, obj2, **hints):
|
def allow_relation(self, obj1, obj2, **hints):
|
||||||
if (obj1 == Member and obj2._meta.app_label == self.app_label) or \
|
if (isinstance(obj1, Member) and obj2._meta.app_label == self.app_label) or \
|
||||||
(obj2 == Member and obj1._meta.app_label == self.app_label):
|
(isinstance(obj2, Member) and obj1._meta.app_label == self.app_label):
|
||||||
return True
|
return True
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user