Skip to content

Commit e88bee2

Browse files
committed
OrderedDict
1 parent ab84df8 commit e88bee2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/DrinkingBuddyServer/__main__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def search():
130130

131131
item = session.query(Item, Item.id, Item.name, Item.price).filter(Item.barcode == query_str).one_or_none()
132132
if item is not None:
133-
return dict(
133+
return OrderedDict(
134134
type='Item',
135135
id=int_to_opaque_str(item.id),
136136
name=item.name,
@@ -143,7 +143,7 @@ def search():
143143

144144
user = session.query(User, User.id, User.name, User.balance).join(Card, User.id == Card.user_id).filter(Card.id == query_int).one_or_none()
145145
if user is not None:
146-
return dict(
146+
return OrderedDict(
147147
type='User',
148148
id=int_to_opaque_str(user.id),
149149
name=user.name,
@@ -195,7 +195,7 @@ def transact():
195195

196196
session.commit()
197197

198-
return dict(
198+
return OrderedDict(
199199
id=urllib.parse.quote_from_bytes(int_to_bytes(user.id)),
200200
name=user.name,
201201
balance=user.balance,

0 commit comments

Comments
 (0)