From d65d761ff90510255329baa5a845b19dc3c1f45e Mon Sep 17 00:00:00 2001 From: Samir Shah Date: Fri, 23 Aug 2019 09:56:40 +0300 Subject: [PATCH] Ensure that currency constants are not modified in place. --- donate/core/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/donate/core/models.py b/donate/core/models.py index 5ec728dd1..0b586db9f 100644 --- a/donate/core/models.py +++ b/donate/core/models.py @@ -1,3 +1,4 @@ +from copy import deepcopy from decimal import Decimal from django.conf import settings @@ -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