Browse Source

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 years ago
parent
commit
57e9d305c9
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/oscar/views/generic.py

+ 1
- 1
src/oscar/views/generic.py View File

@@ -192,7 +192,7 @@ class PhoneNumberMixin(object):
192 192
 
193 193
         # empty
194 194
         if number in validators.EMPTY_VALUES:
195
-            return None
195
+            return ''
196 196
 
197 197
         # Check for an international phone format
198 198
         try:

Loading…
Cancel
Save