diff --git a/api/kiwi_vpn_api/db/schemas.py b/api/kiwi_vpn_api/db/schemas.py index 709bb01..3325caa 100644 --- a/api/kiwi_vpn_api/db/schemas.py +++ b/api/kiwi_vpn_api/db/schemas.py @@ -131,11 +131,10 @@ class User(UserBase): ) -> None: for capability in capabilities: if capability not in self.capabilities: - cap = models.UserCapability( + db.add(models.UserCapability( user_name=self.name, capability=capability.value, - ) - db.add(cap) + )) db.commit()