feature/fix_generate_pass
Andrey 8 years ago
parent 4e1ea3f3df
commit 98d50f1e93
  1. 5
      storage/api.py

@ -17,13 +17,16 @@ def upload_file(original=None, name=None, base64=None) -> File:
return new_file
def add_comment(text: str, email: str, files=[]) -> Comment:
def add_comment(text: str, email: str, files=None) -> Comment:
"""
:param text: sting
:param email: string
:param files: {name?: string, original?: File, base64?: string}[] одно из двух последних свойств должно быть указано
:return: Comment
"""
files = [] if files is None else files
key = ''.join(random.choice(string.ascii_letters) for _x in range(15))
comment = Comment.objects.create(
text=text,

Loading…
Cancel
Save