remove ugly kwargs versions

This commit is contained in:
Jörn-Michael Miehe 2022-03-29 00:14:36 +00:00
parent 8a0058f7f0
commit 4ca92a11b2
2 changed files with 0 additions and 29 deletions

View file

@ -85,22 +85,6 @@ class Device(DeviceBase, table=True):
# device already existed # device already existed
return None return None
@classmethod
def create_kwargs(
cls,
*,
owner: User,
**kwargs
) -> Device | None:
"""
Create a new device in the database. Keywords version.
"""
return cls.create(
owner=owner,
device=DeviceCreate(**kwargs),
)
def update(self) -> None: def update(self) -> None:
""" """
Update this device in the database. Update this device in the database.

View file

@ -113,19 +113,6 @@ class User(UserBase, table=True):
# user already existed # user already existed
return None return None
@classmethod
def create_kwargs(
cls,
**kwargs
) -> User | None:
"""
Create a new user in the database. Keywords version.
"""
return cls.create(
user=UserCreate(**kwargs),
)
@classmethod @classmethod
def get(cls, name: str) -> User | None: def get(cls, name: str) -> User | None:
""" """