add proper repr for exceptions

This commit is contained in:
grillazz
2021-04-05 19:34:50 +02:00
parent 240784611c
commit 5b4d83a4aa
2 changed files with 4 additions and 12 deletions

View File

@@ -18,15 +18,6 @@ class Stuff(Base):
self.name = name
self.description = description
@classmethod
async def create(cls, db_session: AsyncSession, schema: StuffSchema):
stuff = Stuff(
name=schema.name,
description=schema.description,
)
await stuff.save(db_session)
return stuff
async def update(self, db_session: AsyncSession, schema: StuffSchema):
self.name = schema.name
self.description = schema.description