summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/locations/models.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/locations/models.py b/app/locations/models.py
index 24b3234..73fd937 100644
--- a/app/locations/models.py
+++ b/app/locations/models.py
@@ -257,8 +257,10 @@ class Campsite(models.Model):
'''Get the price and total price for display in admin '''
if not self.campsite_price:
price = 0
- total = self.nights_stayed * price
- return "{0} ({1}/night)".format(total, self.campsite_price)
+ else:
+ price = self.campsite_price
+ total = self.nights_stayed * price
+ return "${0} (${1})".format(price, total)
def save(self, *args, **kwargs):
created = self.pk is None