Skip to content

Commit

Permalink
fixed tg auth
Browse files Browse the repository at this point in the history
  • Loading branch information
ychebyshev committed Mar 21, 2024
1 parent c3b8e2f commit c621a28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shvatka/api/models/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def to_dto(self):
)

def to_tg_spec(self) -> str:
data = self.dict(exclude={"hash"})
data = self.model_dump(exclude={"hash"}, exclude_none=True, exclude_unset=True)
data["auth_date"] = int(self.auth_date.timestamp())
return "\n".join([f"{key}={data[key]}" for key in sorted(data.keys()) if data.get(key)])

Expand Down

0 comments on commit c621a28

Please sign in to comment.