aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch/models.py
diff options
context:
space:
mode:
authorMitch Riedstra <Mitch@riedstra.us>2017-10-25 15:39:56 -0400
committerMitch Riedstra <Mitch@riedstra.us>2017-10-25 15:39:56 -0400
commitc74a4e1b2251cac6adbb812d0f3a98cca89dfcc8 (patch)
treefb37c3c32076120639bcb588484f2526f3e8af12 /app/dispatch/models.py
parentfae5a7e38ef7084990724df51488f54c52ec592d (diff)
downloaddispatch-tracker-c74a4e1b2251cac6adbb812d0f3a98cca89dfcc8.tar.gz
dispatch-tracker-c74a4e1b2251cac6adbb812d0f3a98cca89dfcc8.tar.xz
Further adjustments to the invoice format. Allow default bill to to be set for superusers
Diffstat (limited to 'app/dispatch/models.py')
-rw-r--r--app/dispatch/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/dispatch/models.py b/app/dispatch/models.py
index 13650ac..dd088c4 100644
--- a/app/dispatch/models.py
+++ b/app/dispatch/models.py
@@ -60,7 +60,9 @@ class Identity(models.Model):
def set_default(self):
try:
- Settings.objects.get(key="default_bill_to").value
+ st = Settings.objects.get(key="default_bill_to")
+ st.value = str(self.pk)
+ st.save()
except ObjectDoesNotExist:
st = Settings(key="default_bill_to", value=int(self.pk))
st.save()