Skip to content

Commit

Permalink
new is unset validator
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Sep 17, 2018
1 parent 558a012 commit 40cac71
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/budy/models/bag_line.py
Expand Up @@ -82,6 +82,5 @@ def to_order_line_s(self, order = None):

@appier.operation(name = "Garbage Collect")
def collect_s(self):
if self.bag and not isinstance(self.bag, appier.Reference): return
if self.bag.is_resolvable(): return
if appier.is_unset(self.bag): return
self.delete()
3 changes: 1 addition & 2 deletions src/budy/models/order_line.py
Expand Up @@ -70,6 +70,5 @@ def is_valid_price(self, reload = True):

@appier.operation(name = "Garbage Collect")
def collect_s(self):
if self.order and not isinstance(self.order, appier.Reference): return
if self.order.is_resolvable(): return
if appier.is_unset(self.bag): return
self.delete()
3 changes: 1 addition & 2 deletions src/budy/models/wishlist_line.py
Expand Up @@ -64,6 +64,5 @@ def pre_validate(self):

@appier.operation(name = "Garbage Collect")
def collect_s(self):
if self.wishlist and not isinstance(self.wishlist, appier.Reference): return
if self.wishlist.is_resolvable(): return
if appier.is_unset(self.bag): return
self.delete()

0 comments on commit 40cac71

Please sign in to comment.