remove ugly kwargs versions
This commit is contained in:
parent
8a0058f7f0
commit
4ca92a11b2
2 changed files with 0 additions and 29 deletions
|
@ -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.
|
||||||
|
|
|
@ -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:
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue