ob-dj-store 0.0.20.6__py3-none-any.whl → 0.0.20.8__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,24 @@ 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
424
  ):
425
425
  raise serializers.ValidationError(
426
426
  _("Pickup time must be between store's opening hours")
427
427
  )
428
+ if (
429
+ not op_hour.is_open_after_midnight
430
+ and not op_hour.always_open
431
+ and not from_hour <= pickup_time_time <= to_hour
432
+ ):
433
+ raise serializers.ValidationError(
434
+ _("Pickup time must be between store's opening hours")
435
+ )
436
+
428
437
  except ObjectDoesNotExist:
429
438
  logger.error(f"{store.name} Store doesn't have opening hours for ")
430
439
 
@@ -1178,14 +1187,14 @@ class StoreSerializer(ArabicFieldsMixin, FavoriteMixin, serializers.ModelSeriali
1178
1187
  if current_op_hour:
1179
1188
  from_hour = current_op_hour.from_hour
1180
1189
  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
- # )
1190
+ if current_time.tzinfo.zone != "Asia/Dubai":
1191
+ if obj.currency == "AED":
1192
+ try:
1193
+ current_time += timedelta(hours=1)
1194
+ except Exception as e:
1195
+ logger.info(
1196
+ f"The fix for UAE stores timezone failed due to this error {e}"
1197
+ )
1189
1198
 
1190
1199
  if current_op_hour.is_open_after_midnight:
1191
1200
  return True if to_hour < current_time.time() < from_hour else False
@@ -0,0 +1,25 @@
1
+ # Generated by Django 3.2.8 on 2025-07-10 11:25
2
+
3
+ import django.db.models.deletion
4
+ from django.conf import settings
5
+ from django.db import migrations, models
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+
10
+ dependencies = [
11
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
12
+ ("tap", "0007_alter_tappayment_source"),
13
+ ]
14
+
15
+ operations = [
16
+ migrations.AlterField(
17
+ model_name="tappayment",
18
+ name="user",
19
+ field=models.ForeignKey(
20
+ help_text="Captured the User ID for both registered users and Guests (Every guest user has a user_id assigned by device_id)",
21
+ on_delete=django.db.models.deletion.CASCADE,
22
+ to=settings.AUTH_USER_MODEL,
23
+ ),
24
+ ),
25
+ ]
@@ -37,7 +37,7 @@ class TapPayment(models.Model):
37
37
  source = models.CharField(max_length=100, choices=Sources.choices)
38
38
  user = models.ForeignKey(
39
39
  settings.AUTH_USER_MODEL,
40
- on_delete=models.DO_NOTHING,
40
+ on_delete=models.CASCADE,
41
41
  help_text=_(
42
42
  "Captured the User ID for both registered "
43
43
  "users and Guests (Every guest user has a user_id assigned by device_id)"
@@ -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.8
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=HeUvpFUz8DMOLCmiSEPmitlsoNfjUJq9h2zaXqZKi7w,66013
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
@@ -22,7 +22,7 @@ ob_dj_store/core/stores/gateway/tap/__init__.py,sha256=5Z6azpb6tmr1nRvKwQWzlYw9r
22
22
  ob_dj_store/core/stores/gateway/tap/admin.py,sha256=tGtLg6ttkZXb7JtFPD-5r46pCmb1BsbQpv182KlY3-o,1153
23
23
  ob_dj_store/core/stores/gateway/tap/apps.py,sha256=kWwPjuAJeEmEasVDzUbvRsGaQWL-aYe4JDHNLvCVXPs,212
24
24
  ob_dj_store/core/stores/gateway/tap/managers.py,sha256=FmnJVWwShbNJPU_USZA2hC8g2W3D_S4J3sxN8JROlRo,817
25
- ob_dj_store/core/stores/gateway/tap/models.py,sha256=ZbMdglR2a8MhHO-qfOFP7tjxiA8XmZb8IKP5L7TXrZY,4786
25
+ ob_dj_store/core/stores/gateway/tap/models.py,sha256=KfM8s_tFlGIVpaol9CVFjSaCx6zn7wu3l90oWBviV7I,4783
26
26
  ob_dj_store/core/stores/gateway/tap/utils.py,sha256=bajB6TH83AVPzm9npshgIZy-PUd0dt4vS4msLs2h998,5206
27
27
  ob_dj_store/core/stores/gateway/tap/migrations/0001_initial.py,sha256=U8Cv1zLEb4SB4uX5Jjt6QJi7RkZ46-3TF18NcupHb-8,4778
28
28
  ob_dj_store/core/stores/gateway/tap/migrations/0002_auto_20220815_1610.py,sha256=gRsekTbqUH4h5yg5d1zWuai7Wiv6-rfsmjnXundgin8,674
@@ -31,6 +31,7 @@ ob_dj_store/core/stores/gateway/tap/migrations/0004_tapcustomer.py,sha256=tazV01
31
31
  ob_dj_store/core/stores/gateway/tap/migrations/0005_alter_tappayment_payment_url.py,sha256=M66KGz3b1R-xkv3GPQKkrKDUrO-2L0mmbcnmDDP_xII,512
32
32
  ob_dj_store/core/stores/gateway/tap/migrations/0006_alter_tappayment_source.py,sha256=K-aktQ87sbvSedumIo-dxrJ32CjCwbEWqLyGGzexqhU,655
33
33
  ob_dj_store/core/stores/gateway/tap/migrations/0007_alter_tappayment_source.py,sha256=OXK2Esw908DBYlf5rkvqc645gKSOfkUL0RFOmcTrVFM,700
34
+ ob_dj_store/core/stores/gateway/tap/migrations/0008_alter_tappayment_user.py,sha256=oSjhhPOMM37VLWdr25YcR9rm0Zkq6wQQzV64fClYCBI,771
34
35
  ob_dj_store/core/stores/gateway/tap/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
36
  ob_dj_store/core/stores/migrations/0001_initial.py,sha256=Ny58kubU6qNVr2TYD1p61Sb8jQGgdLjVN5HwywugN8k,2108
36
37
  ob_dj_store/core/stores/migrations/0002_auto_20220422_0205.py,sha256=hnfr60m50hyIL2QkPfD8rKWLtfVjW58L9vNkYo72ZII,382
@@ -158,7 +159,7 @@ ob_dj_store/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
158
159
  ob_dj_store/utils/helpers.py,sha256=o7wgypM7mI2vZqZKkhxnTcnHJC8GMQDOuYMnRwXr6tY,2058
159
160
  ob_dj_store/utils/model.py,sha256=DV7hOhTaZL3gh9sptts2jTUFlTArKG3i7oPioq9HLFE,303
160
161
  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,,
162
+ ob_dj_store-0.0.20.8.dist-info/METADATA,sha256=9FsAIsFu8qFF8RmriRXcPKwHq9krgPwQyJx6Ph-E9oQ,2850
163
+ ob_dj_store-0.0.20.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
164
+ ob_dj_store-0.0.20.8.dist-info/top_level.txt,sha256=CZG3G0ptTkzGnc0dFYN-ZD7YKdJBmm47bsmGwofD_lk,12
165
+ ob_dj_store-0.0.20.8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.0.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5