ob-dj-store 0.0.19.6__py3-none-any.whl → 0.0.19.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.
@@ -396,6 +396,7 @@ class OrderSerializer(serializers.ModelSerializer):
396
396
 
397
397
  def _validate_pickup_time(self, store, pickup_time):
398
398
  # validate that the pickup_time is always in the future
399
+ print("pickup :", pickup_time)
399
400
  if pickup_time < localtime(now()):
400
401
  raise serializers.ValidationError(_("Pickup time must be in the future"))
401
402
  pickup_time_time = pickup_time.time()
@@ -723,7 +724,10 @@ class CartItemSerializer(
723
724
  return product.product_variants.all().count() > 1
724
725
 
725
726
  def get_is_available_in_store(self, obj):
726
- return True if obj.inventory else False
727
+ if obj.inventory:
728
+ if obj.inventory.quantity:
729
+ return True
730
+ return False
727
731
 
728
732
  def get_product_id(self, obj):
729
733
  return obj.product_variant.product.id
@@ -1402,9 +1406,12 @@ class FavoriteSerializer(ArabicFieldsMixin, serializers.ModelSerializer):
1402
1406
  try:
1403
1407
  extra = obj.extras.get(content_type=content_type)
1404
1408
  inventory = extra.content_object.inventories.get(store=store_id)
1405
- if inventory.is_uncountable:
1406
- return True
1407
- return inventory.quantity > 0
1409
+ if inventory.is_snoozed:
1410
+ return False
1411
+ else:
1412
+ if inventory.is_uncountable:
1413
+ return True
1414
+ return inventory.quantity > 0
1408
1415
  except ObjectDoesNotExist:
1409
1416
  return False
1410
1417
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ob-dj-store
3
- Version: 0.0.19.6
3
+ Version: 0.0.19.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=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=vpO_IXF2Fqfy7ML013nWRLeXAVZmpf3pLavotLaEr-M,64410
6
+ ob_dj_store/apis/stores/rest/serializers/serializers.py,sha256=j511ztKSljd8ObdmLTndvp31YEBhJalu6exbOuTa7r4,64623
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.19.6.dist-info/METADATA,sha256=rqdkn9xKtui3jW-njVv9yaS0UzwCqytDb_GllHO_p8o,2827
159
- ob_dj_store-0.0.19.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
160
- ob_dj_store-0.0.19.6.dist-info/top_level.txt,sha256=CZG3G0ptTkzGnc0dFYN-ZD7YKdJBmm47bsmGwofD_lk,12
161
- ob_dj_store-0.0.19.6.dist-info/RECORD,,
158
+ ob_dj_store-0.0.19.8.dist-info/METADATA,sha256=Vr7hVp3_AAw1Px15BPHr-jSfpTzSm7V2mxsbEjQHPnU,2827
159
+ ob_dj_store-0.0.19.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
160
+ ob_dj_store-0.0.19.8.dist-info/top_level.txt,sha256=CZG3G0ptTkzGnc0dFYN-ZD7YKdJBmm47bsmGwofD_lk,12
161
+ ob_dj_store-0.0.19.8.dist-info/RECORD,,