Skip to content

Commit

Permalink
new empty bag operation
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Mar 23, 2016
1 parent 5beab61 commit 669644b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/budy/models/bag.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,9 @@ def to_order_s(self):
_order.lines.append(order_line)
_order.save()
return _order

@appier.operation(name = "Empty Bag")
def empty_bag_s(self):
for line in self.lines: line.delete()
self.lines = []
self.save()

0 comments on commit 669644b

Please sign in to comment.