-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding CreateClientFunction #50
Conversation
""" | ||
self.clients_db = DynamoDBHandler( | ||
table_name=settings.CLIENTS_TABLE_NAME, | ||
partition_key="Id", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is partition key maped from phone to Id?
message=str(error), | ||
) | ||
|
||
def scan_table(self) -> Dict[str, Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont thnk we are going to need this one
data = { | ||
"phone_number": self.client_data["phone_number"], | ||
"name": self.client_data["name"], | ||
"address": self.client_data["address"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"address": self.client_data["address"], | |
"first_address": self.client_data["first_address"], |
"phone_number": self.client_data["phone_number"], | ||
"name": self.client_data["name"], | ||
"address": self.client_data["address"], | ||
"latitude": latitude, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"latitude": latitude, | |
"first_latitude": latitude, |
"name": self.client_data["name"], | ||
"address": self.client_data["address"], | ||
"latitude": latitude, | ||
"longitude": longitude, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"longitude": longitude, | |
"first_longitude": longitude, |
ReadCapacityUnits: 5 | ||
WriteCapacityUnits: 5 | ||
|
||
HiBerrySearchLocationIndex: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we creating a new index? we could just refference that one
@@ -152,6 +152,7 @@ def build_order( | |||
"driver": driver, | |||
"source": source.value, | |||
"cooler": self.order_data.get("cooler", None), | |||
"discount": self.order_data.get("discount"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know why this changes appear again?
@@ -45,6 +45,7 @@ class HIBerryOrder(DeliveryDateMixin): | |||
delivery_address: StrictStr | |||
phone_number: StrictStr | |||
cart_items: List[HIBerryProduct] | |||
discount: StrictStr | None = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know why this changes appear again?
@@ -57,6 +58,10 @@ def calculate_total_amount(cls, value, values): | |||
calculated_total = sum( | |||
item.price * item.quantity for item in values.get("cart_items", []) | |||
) | |||
if values["discount"] and values["discount"] == "5": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know why this changes appear again?
@@ -180,6 +180,10 @@ def assign_driver_for_delivery( | |||
if driver_assigned == 0: | |||
return 0 | |||
|
|||
# Saturday is day 5, in sat only one schedule is running, so all sector are available | |||
if day_of_week == 5: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know why this changes appear again?
/clients