Преглед изворни кода

Fix compatibility with django-phonenumbers-field 1.3.0

Return an empty string when no value was given for a phone number instead
of None since the phonenumberfield doesn't cast none to '' anymore which
resulted in an not null sql error.
master
Michael van Tellingen пре 8 година
родитељ
комит
57e9d305c9
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1
    1
      src/oscar/views/generic.py

+ 1
- 1
src/oscar/views/generic.py Прегледај датотеку

192
 
192
 
193
         # empty
193
         # empty
194
         if number in validators.EMPTY_VALUES:
194
         if number in validators.EMPTY_VALUES:
195
-            return None
195
+            return ''
196
 
196
 
197
         # Check for an international phone format
197
         # Check for an international phone format
198
         try:
198
         try:

Loading…
Откажи
Сачувај