def create_plex_account(cls, account): try: return True, PlexAccount.create( account=account ) except (apsw.ConstraintError, peewee.IntegrityError): return False, PlexAccount.get( account=account )
def create_plex_account(cls, account): try: return True, PlexAccount.create(account=account) except (apsw.ConstraintError, peewee.IntegrityError): return False, PlexAccount.get(account=account)