Skip to content

Instantly share code, notes, and snippets.

@pskd73
Created February 24, 2020 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pskd73/894d0a117b594c4a9c8703bdd01c1d9c to your computer and use it in GitHub Desktop.
Save pskd73/894d0a117b594c4a9c8703bdd01c1d9c to your computer and use it in GitHub Desktop.
def assign_logistic_service(order):
for logistic in logistic_services:
if logistic.is_serviceable(order.postal_code):
# if hack
if logistic.__class__.__name__ == 'DoneTodayLogisticService':
if order.postal_code in [690040, 690041]:
continue
logistic.make_shipping_request()
return logistic.__class__.__name__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment