ob-dj-store 0.0.20.6__py3-none-any.whl → 0.0.20.7__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.
@@ -416,15 +416,23 @@ class OrderSerializer(serializers.ModelSerializer):
416
416
  logger.info(
417
417
  f"The fix for UAE stores timezone failed due to this error {e}"
418
418
  )
419
+
419
420
  if (
420
421
  op_hour.is_open_after_midnight
421
422
  and not op_hour.always_open
422
- and pickup_time_time > to_hour
423
- or pickup_time_time < from_hour
423
+ and (pickup_time_time > to_hour and pickup_time_time < from_hour)
424
+ ):
425
+ raise serializers.ValidationError(
426
+ _("Pickup time must be between store's opening hours")
427
+ )
428
+ if (
429
+ not op_hour.is_open_after_midnight
430
+ and not from_hour <= pickup_time_time <= to_hour
424
431
  ):
425
432
  raise serializers.ValidationError(
426
433
  _("Pickup time must be between store's opening hours")
427
434
  )
435
+
428
436
  except ObjectDoesNotExist:
429
437
  logger.error(f"{store.name} Store doesn't have opening hours for ")
430
438
 
@@ -1178,14 +1186,14 @@ class StoreSerializer(ArabicFieldsMixin, FavoriteMixin, serializers.ModelSeriali
1178
1186
  if current_op_hour:
1179
1187
  from_hour = current_op_hour.from_hour
1180
1188
  to_hour = current_op_hour.to_hour
1181
- # if current_time.tzinfo.zone != "Asia/Dubai":
1182
- # if obj.currency == "AED":
1183
- # try:
1184
- # current_time += timedelta(hours=1)
1185
- # except Exception as e:
1186
- # logger.info(
1187
- # f"The fix for UAE stores timezone failed due to this error {e}"
1188
- # )
1189
+ if current_time.tzinfo.zone != "Asia/Dubai":
1190
+ if obj.currency == "AED":
1191
+ try:
1192
+ current_time += timedelta(hours=1)
1193
+ except Exception as e:
1194
+ logger.info(
1195
+ f"The fix for UAE stores timezone failed due to this error {e}"
1196
+ )
1189
1197
 
1190
1198
  if current_op_hour.is_open_after_midnight:
1191
1199
  return True if to_hour < current_time.time() < from_hour else False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ob-dj-store
3
- Version: 0.0.20.6
3
+ Version: 0.0.20.7
4
4
  Summary: OBytes django application for managing ecommerce stores.
5
5
  Home-page: https://www.obytes.com/
6
6
  Author: OBytes
@@ -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=kbKtrg9ba9R5ptN9xOOEo-ZZ2IZbQfGH6BJCGUzF1bc,9510
4
4
  ob_dj_store/apis/stores/urls.py,sha256=7vwogfIGcKS0hHYK3iBXKQwi1kCA_vuHY1eZt8rAspg,2021
5
5
  ob_dj_store/apis/stores/views.py,sha256=P8hkpMxC080QlPGFXaQXV2wKoo-B0aUg-hToHtMG24s,41612
6
- ob_dj_store/apis/stores/rest/serializers/serializers.py,sha256=vfCqxP3PqbV9Kni75W30HHEx0ro3_5O3sHgQ3pnUnlU,65704
6
+ ob_dj_store/apis/stores/rest/serializers/serializers.py,sha256=5P8C_mki1qVsTBFppEu9Ys0uE71pdWuYhxUSTPKiV94,65969
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
@@ -158,7 +158,7 @@ ob_dj_store/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
158
158
  ob_dj_store/utils/helpers.py,sha256=o7wgypM7mI2vZqZKkhxnTcnHJC8GMQDOuYMnRwXr6tY,2058
159
159
  ob_dj_store/utils/model.py,sha256=DV7hOhTaZL3gh9sptts2jTUFlTArKG3i7oPioq9HLFE,303
160
160
  ob_dj_store/utils/utils.py,sha256=8UVAFB56qUSjJJ5f9vnermtw638gdFy4CFRCuMbns_M,1342
161
- ob_dj_store-0.0.20.6.dist-info/METADATA,sha256=h-SZzXoCLcoEluczxfQpNY88s5EKLHvopyd4_xyATUA,2850
162
- ob_dj_store-0.0.20.6.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
163
- ob_dj_store-0.0.20.6.dist-info/top_level.txt,sha256=CZG3G0ptTkzGnc0dFYN-ZD7YKdJBmm47bsmGwofD_lk,12
164
- ob_dj_store-0.0.20.6.dist-info/RECORD,,
161
+ ob_dj_store-0.0.20.7.dist-info/METADATA,sha256=5VjZm9Hv7Zl1RSBi2yw3-P3dNobmZJ0wYNdxV9F9nUU,2850
162
+ ob_dj_store-0.0.20.7.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
163
+ ob_dj_store-0.0.20.7.dist-info/top_level.txt,sha256=CZG3G0ptTkzGnc0dFYN-ZD7YKdJBmm47bsmGwofD_lk,12
164
+ ob_dj_store-0.0.20.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.0.0)
2
+ Generator: setuptools (80.3.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5