Beispiel #1
0
def dump_user(user: User) -> Dict:
    schema = UserSchema()
    try:
        data, errors = schema.dump(user)
        return data
    except ValidationError as err:
        return err.messages
def dump_user(user: User) -> Dict:
    schema = UserSchema()
    return schema.dump(user)