diff options
Diffstat (limited to 'servo')
-rw-r--r-- | servo/models/order.py | 3 | ||||
-rw-r--r-- | servo/models/repair.py | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/servo/models/order.py b/servo/models/order.py index c7fb594..aad1932 100644 --- a/servo/models/order.py +++ b/servo/models/order.py @@ -367,6 +367,9 @@ class Order(models.Model): self.set_status(self.queue.status_closed, user) def reopen(self, user): + """ + Re-opens this service order + """ self.state = Order.STATE_OPEN self.closed_at = None self.save() diff --git a/servo/models/repair.py b/servo/models/repair.py index c9bb952..ba52980 100644 --- a/servo/models/repair.py +++ b/servo/models/repair.py @@ -89,7 +89,7 @@ class ActiveManager(models.Manager): GSX repairs that have been submitted, and not marked complete """ use_for_related_fields = True - + def active(self, **kwargs): return self.filter(completed_at=None, **kwargs).exclude(submitted_at=None) @@ -198,8 +198,7 @@ class Repair(models.Model): symptom_code = models.CharField(max_length=7, default='') issue_code = models.CharField(max_length=7, default='') - objects = models.Manager() - active = ActiveManager() + objects = ActiveManager() def is_submitted(self): return self.submitted_at is not None |