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

Ensure that currency constants are not modified in place. #208

Merged
merged 1 commit into from
Aug 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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