Fix == -> isinstance typo

This commit is contained in:
Adam Goldsmith 2021-04-29 13:32:49 -04:00
parent 2690e2550d
commit 84ac1e8257

View File

@ -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