ob-dj-store 0.0.13.10__py3-none-any.whl → 0.0.13.11__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.
@@ -715,15 +715,26 @@ class SubCategorySerializer(serializers.ModelSerializer):
715
715
  if store_id:
716
716
  try:
717
717
  current_availability_hours = AvailabilityHours.objects.get(
718
- weekday=now().weekday() + 1,
718
+ weekday=localtime(now()).weekday() + 1,
719
719
  store=store_id,
720
720
  category=obj,
721
721
  )
722
- return (
722
+ parent_availability_hours = AvailabilityHours.objects.get(
723
+ weekday=localtime(now()).weekday() + 1,
724
+ store=store_id,
725
+ category=obj.parent,
726
+ )
727
+ is_available_sub = (
723
728
  current_availability_hours.from_hour
724
- <= now().time()
729
+ <= localtime(now()).time()
725
730
  <= current_availability_hours.to_hour
726
731
  )
732
+ is_available_parent = (
733
+ parent_availability_hours.from_hour
734
+ <= localtime(now()).time()
735
+ <= parent_availability_hours.to_hour
736
+ )
737
+ return is_available_sub and is_available_parent
727
738
  except ObjectDoesNotExist:
728
739
  pass
729
740
  return False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ob-dj-store
3
- Version: 0.0.13.10
3
+ Version: 0.0.13.11
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=O5DAzet_WGNoWSEnqbPtwrKy3sbe1HzTtx8jcTLz1dk,7680
4
4
  ob_dj_store/apis/stores/urls.py,sha256=P4d0iamg2R5lTwc5DTIuhLzJTMSH4f5QpHzGR1_PWE0,1676
5
5
  ob_dj_store/apis/stores/views.py,sha256=Umdt1Lu1q4V5R6XasCLpTKjmM2VFco1qa-Z8Ba5Fsuk,36085
6
- ob_dj_store/apis/stores/rest/serializers/serializers.py,sha256=AhoxEMqCcYEIhVUL1OjIRvuAFsxeZEMVECPmVBugQ0c,45893
6
+ ob_dj_store/apis/stores/rest/serializers/serializers.py,sha256=R4ppx2eEHxU2zrYhi2muxHG3sJN0RIYQaTMDbpWyEyY,46439
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
@@ -126,7 +126,7 @@ ob_dj_store/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
126
126
  ob_dj_store/utils/helpers.py,sha256=o7wgypM7mI2vZqZKkhxnTcnHJC8GMQDOuYMnRwXr6tY,2058
127
127
  ob_dj_store/utils/model.py,sha256=DV7hOhTaZL3gh9sptts2jTUFlTArKG3i7oPioq9HLFE,303
128
128
  ob_dj_store/utils/utils.py,sha256=8UVAFB56qUSjJJ5f9vnermtw638gdFy4CFRCuMbns_M,1342
129
- ob_dj_store-0.0.13.10.dist-info/METADATA,sha256=XghzSB_Drsn1eraRDvuePPWcn9cZhS07xTetM8j6I3w,2828
130
- ob_dj_store-0.0.13.10.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
131
- ob_dj_store-0.0.13.10.dist-info/top_level.txt,sha256=CZG3G0ptTkzGnc0dFYN-ZD7YKdJBmm47bsmGwofD_lk,12
132
- ob_dj_store-0.0.13.10.dist-info/RECORD,,
129
+ ob_dj_store-0.0.13.11.dist-info/METADATA,sha256=Rztx3a8uLPB-0Xv8GCvclKk66dos3KEGw3tPvRbBKXs,2828
130
+ ob_dj_store-0.0.13.11.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
131
+ ob_dj_store-0.0.13.11.dist-info/top_level.txt,sha256=CZG3G0ptTkzGnc0dFYN-ZD7YKdJBmm47bsmGwofD_lk,12
132
+ ob_dj_store-0.0.13.11.dist-info/RECORD,,