ob-dj-store 0.0.18.6__py3-none-any.whl → 0.0.18.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.
@@ -1116,6 +1116,7 @@ class StoreSerializer(ArabicFieldsMixin, FavoriteMixin, serializers.ModelSeriali
1116
1116
  "image",
1117
1117
  "busy_mode",
1118
1118
  "name_arabic",
1119
+ "is_open_after_midnight",
1119
1120
  )
1120
1121
  extra_kwargs = {
1121
1122
  "image": {"read_only": True, "required": False},
@@ -1124,9 +1125,20 @@ class StoreSerializer(ArabicFieldsMixin, FavoriteMixin, serializers.ModelSeriali
1124
1125
  def get_is_closed(self, obj):
1125
1126
  if obj.busy_mode:
1126
1127
  return True
1128
+
1127
1129
  current_time = localtime(now())
1128
1130
  current_op_hour = obj.current_opening_hours
1129
1131
  if current_op_hour:
1132
+
1133
+ if obj.is_open_after_midnight:
1134
+ return (
1135
+ True
1136
+ if current_op_hour.to_hour
1137
+ < current_time.time()
1138
+ < current_op_hour.from_hour
1139
+ else False
1140
+ )
1141
+
1130
1142
  if current_op_hour.always_open:
1131
1143
  return False
1132
1144
  return (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ob-dj-store
3
- Version: 0.0.18.6
3
+ Version: 0.0.18.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=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=8Sj5KA_3Yx3m_a2P9nltdvO84D__zKaSCdzuCxnxqFo,62874
6
+ ob_dj_store/apis/stores/rest/serializers/serializers.py,sha256=yZHKYh77rc37-Ve0MwuDOcf5NoCtlh20hRfP8H2hxCc,63194
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.18.6.dist-info/METADATA,sha256=y2KqsLvjneTiAz3-sd-qd4eroePNv_OEXr2iNQ9HhcA,2827
159
- ob_dj_store-0.0.18.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
160
- ob_dj_store-0.0.18.6.dist-info/top_level.txt,sha256=CZG3G0ptTkzGnc0dFYN-ZD7YKdJBmm47bsmGwofD_lk,12
161
- ob_dj_store-0.0.18.6.dist-info/RECORD,,
158
+ ob_dj_store-0.0.18.7.dist-info/METADATA,sha256=u585C53kGBFTWdVM-y8tzELuzCdvJUSGM7I98KUKpn0,2827
159
+ ob_dj_store-0.0.18.7.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
160
+ ob_dj_store-0.0.18.7.dist-info/top_level.txt,sha256=CZG3G0ptTkzGnc0dFYN-ZD7YKdJBmm47bsmGwofD_lk,12
161
+ ob_dj_store-0.0.18.7.dist-info/RECORD,,