Skip to content

Commit 9be869b

Browse files
committed
Fix 'orders' view error with no trade skills
1 parent 0b034a1 commit 9be869b

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

thing/views.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ def orders(request):
534534
cursor.execute(queries.order_aggregation, (request.user.id,))
535535
char_orders = OrderedDict()
536536
for row in dictfetchall(cursor):
537+
row['slots'] = 5
537538
char_orders[row['character_id']] = row
538539

539540
# Retrieve... skills? Hrm.
@@ -542,9 +543,6 @@ def orders(request):
542543
if char_id not in char_orders:
543544
continue
544545

545-
if 'slots' not in char_orders[char_id]:
546-
char_orders[char_id]['slots'] = 5
547-
548546
char_orders[char_id]['slots'] += (cs.level * ORDER_SLOT_SKILLS.get(cs.skill.item.name, 0))
549547

550548
# Calculate free slots

0 commit comments

Comments
 (0)