ob-dj-store 0.0.20.1__py3-none-any.whl → 0.0.20.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ob_dj_store/apis/stores/rest/serializers/serializers.py +6 -1
- {ob_dj_store-0.0.20.1.dist-info → ob_dj_store-0.0.20.2.dist-info}/METADATA +1 -1
- {ob_dj_store-0.0.20.1.dist-info → ob_dj_store-0.0.20.2.dist-info}/RECORD +5 -5
- {ob_dj_store-0.0.20.1.dist-info → ob_dj_store-0.0.20.2.dist-info}/WHEEL +1 -1
- {ob_dj_store-0.0.20.1.dist-info → ob_dj_store-0.0.20.2.dist-info}/top_level.txt +0 -0
@@ -362,7 +362,7 @@ class OrderSerializer(serializers.ModelSerializer):
|
|
362
362
|
raise serializers.ValidationError(errors)
|
363
363
|
email = gift_details.get("email")
|
364
364
|
phone_number = gift_details.get("phone_number")
|
365
|
-
|
365
|
+
user = self.context["request"].user
|
366
366
|
if email and phone_number:
|
367
367
|
raise serializers.ValidationError(
|
368
368
|
_("Both Email and Phone number cannot be provided.")
|
@@ -376,7 +376,12 @@ class OrderSerializer(serializers.ModelSerializer):
|
|
376
376
|
validate_email(email)
|
377
377
|
except ValidationError:
|
378
378
|
raise serializers.ValidationError(_("Invalid Email format."))
|
379
|
+
try:
|
380
|
+
if not gift_details["currency"]:
|
381
|
+
gift_details["currency"] = get_currency_by_country(user.country.code)
|
379
382
|
|
383
|
+
except Exception:
|
384
|
+
raise serializers.ValidationError("Currency is required")
|
380
385
|
if not pycountry.currencies.get(alpha_3=gift_details["currency"]):
|
381
386
|
raise serializers.ValidationError("Gift currency is not valid")
|
382
387
|
try:
|
@@ -3,7 +3,7 @@ ob_dj_store/apis/stores/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
3
3
|
ob_dj_store/apis/stores/filters.py,sha256=zKBXPBoqIyFlSeZOECp97RTWvSLqNPnlPhEp7p8W5tE,9702
|
4
4
|
ob_dj_store/apis/stores/urls.py,sha256=7vwogfIGcKS0hHYK3iBXKQwi1kCA_vuHY1eZt8rAspg,2021
|
5
5
|
ob_dj_store/apis/stores/views.py,sha256=aE4LFPHzs_CtzZ8K5-vAbDn_51hyhi0KIsi7cV8dpkA,43372
|
6
|
-
ob_dj_store/apis/stores/rest/serializers/serializers.py,sha256=
|
6
|
+
ob_dj_store/apis/stores/rest/serializers/serializers.py,sha256=16tyWBbwC9NGEvfGDz8WdQe6QJo8GYPPzTdpb1Tdlvs,66061
|
7
7
|
ob_dj_store/apis/tap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
ob_dj_store/apis/tap/serializers.py,sha256=KPrBK4h2-fWvEVf6vOj2ww5-USV9WqpyYicIqoHIiXI,1065
|
9
9
|
ob_dj_store/apis/tap/urls.py,sha256=bnOTv6an11kxpo_FdqlhsizlGPLVpNxBjCyKcf3_C9M,367
|
@@ -155,7 +155,7 @@ ob_dj_store/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
155
155
|
ob_dj_store/utils/helpers.py,sha256=o7wgypM7mI2vZqZKkhxnTcnHJC8GMQDOuYMnRwXr6tY,2058
|
156
156
|
ob_dj_store/utils/model.py,sha256=DV7hOhTaZL3gh9sptts2jTUFlTArKG3i7oPioq9HLFE,303
|
157
157
|
ob_dj_store/utils/utils.py,sha256=8UVAFB56qUSjJJ5f9vnermtw638gdFy4CFRCuMbns_M,1342
|
158
|
-
ob_dj_store-0.0.20.
|
159
|
-
ob_dj_store-0.0.20.
|
160
|
-
ob_dj_store-0.0.20.
|
161
|
-
ob_dj_store-0.0.20.
|
158
|
+
ob_dj_store-0.0.20.2.dist-info/METADATA,sha256=_yjSTgCVEnJmDq9qsRD0HOIz3d4B1ucy1FkEiPU53ls,2827
|
159
|
+
ob_dj_store-0.0.20.2.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
|
160
|
+
ob_dj_store-0.0.20.2.dist-info/top_level.txt,sha256=CZG3G0ptTkzGnc0dFYN-ZD7YKdJBmm47bsmGwofD_lk,12
|
161
|
+
ob_dj_store-0.0.20.2.dist-info/RECORD,,
|
File without changes
|