def save(self, *args, **kwargs):
if self.order == '<STR_LIT>' or self.order is None:<EOL><INDENT>try:<EOL><INDENT>self.order = self.get_auto_order_queryset().order_by("<STR_LIT>")[<NUM_LIT:0>].order + <NUM_LIT:1><EOL><DEDENT>except IndexError:<EOL><INDENT>self.order = <NUM_LIT:0><EOL><DEDENT><DEDENT>super(BaseOrdered, self).save()<EOL>
if order left blank