Created
October 20, 2019 22:56
-
-
Save mekhami/d06e623e8972460fec749c00bde894c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@classmethod | |
def group_key(cls, box_shipment: NamedTuple) -> str: | |
return ",".join( | |
[ | |
str(box_shipment.club_id), | |
str(box_shipment.theme_id), | |
",".join(sorted([str(book_id) for book_id in box_shipment.book_ids])), | |
str(box_shipment.outgoing_label), | |
str(box_shipment.sent), | |
str(box_shipment.box_weight_oz), | |
str(box_shipment.inserts_weight_oz), | |
str(box_shipment.return_mailer_weight_oz), | |
str(box_shipment.id) | |
if box_shipment.shipping_address_validation_error | |
else "", | |
] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment