Skip to content

Instantly share code, notes, and snippets.

@hub-cap
Created April 10, 2013 14:55
Show Gist options
  • Save hub-cap/5355345 to your computer and use it in GitHub Desktop.
Save hub-cap/5355345 to your computer and use it in GitHub Desktop.
@classmethod¬
def create(cls, uuid_strategy=utils.generate_uuid, **values):¬
if 'id' not in values and uuid_strategy is not None:¬
values['id'] = uuid_strategy()¬
if hasattr(cls, 'deleted') and 'deleted' not in values:¬
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment