0001-lingo-backend-options-must-be-dict-41439.patch
combo/apps/lingo/models.py | ||
---|---|---|
103 | 103 |
return self.label |
104 | 104 | |
105 | 105 |
def get_payment(self): |
106 |
if isinstance(self.service_options, six.string_types): |
|
106 |
options = self.service_options or {} |
|
107 |
if isinstance(options, six.string_types): |
|
107 | 108 |
# backward compatibility when used againt postgresql < 9.4 and |
108 | 109 |
# service_options is received as a string. |
109 | 110 |
try: |
110 |
self.service_options = json.loads(self.service_options)
|
|
111 |
options = json.loads(options)
|
|
111 | 112 |
except ValueError: |
112 | 113 |
pass |
113 |
return eopayment.Payment(self.service, self.service_options) |
|
114 |
if not isinstance(options, dict): |
|
115 |
options = {} |
|
116 |
return eopayment.Payment(self.service, options) |
|
114 | 117 | |
115 | 118 | |
116 | 119 |
@python_2_unicode_compatible |
117 |
- |