Refactoring Hub Firms routes
This commit is contained in:
1 parent
ef9ae99cb6
commit
d1718becde
3 files changed
+39
-33
No files matched your search
@@ -8,5 +8,11 @@ from hub.firm import FirmRead
|
||||
class UserSchema(BaseUser[PydanticObjectId]):
|
||||
firms: list[FirmRead] = Field()
|
||||
|
||||
def belongs_to(self, firm):
|
||||
for f in self.firms:
|
||||
if f.instance == firm.instance and f.firm == firm.firm :
|
||||
return True
|
||||
return False
|
||||
|
||||
class UserUpdateSchema(BaseUserUpdate):
|
||||
pass
|
||||
Reference in new issue
Block a user