Skip to content

Commit

Permalink
Small code fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Apr 4, 2019
1 parent 260176c commit 49758b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/appier_extras/parts/admin/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,19 +479,19 @@ def is_encrypted(cls, password):
@classmethod
@appier.operation(
name = "Create",
description = """Create a new account woth the provided
description = """Create a new account with the provided
username, email and password, in case no password is
provided a random new one is generated""",
parameters = (
("Username", "username", str),
("Email", "email", str),
("Password", "password", str, None),
("Password", "password", str, ""),
("Send Email", "send_email", bool, False)
),
factory = True
)
def create_s(cls, username, email, password = None, send_email = False):
if password == None: password = appier.gen_token(limit = 16)
def create_s(cls, username, email, password = "", send_email = False):
if not password: password = appier.gen_token(limit = 16)
account = cls(
username = username,
email = email,
Expand Down

0 comments on commit 49758b3

Please sign in to comment.