Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
Ensure that currency constants are not modified in place.
Browse files Browse the repository at this point in the history
  • Loading branch information
solarissmoke committed Aug 23, 2019
1 parent eb77d30 commit d65d761
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion donate/core/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from copy import deepcopy
from decimal import Decimal

from django.conf import settings
Expand Down Expand Up @@ -44,7 +45,7 @@ class DonationPage(Page):

@cached_property
def currencies(self):
return constants.CURRENCIES.copy()
return deepcopy(constants.CURRENCIES)

def get_initial_currency(self, request):
# Query argument takes first preference
Expand Down

0 comments on commit d65d761

Please sign in to comment.