This commit is contained in:
Jörn-Michael Miehe 2022-03-20 01:37:27 +00:00
parent 00bdf88b6e
commit f9762d4a54

View file

@ -131,11 +131,10 @@ class User(UserBase):
) -> None: ) -> None:
for capability in capabilities: for capability in capabilities:
if capability not in self.capabilities: if capability not in self.capabilities:
cap = models.UserCapability( db.add(models.UserCapability(
user_name=self.name, user_name=self.name,
capability=capability.value, capability=capability.value,
) ))
db.add(cap)
db.commit() db.commit()