Skip to content

Commit

Permalink
Merge pull request coagulant#48 from hovel/fix_any_file_field
Browse files Browse the repository at this point in the history
fix any_file_field
  • Loading branch information
GeyseR committed Apr 12, 2016
2 parents 902507a + d91317c commit 30be946
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_any/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def get_some_file(path):
upload_to = field.upload_to
result = get_some_file(upload_to)

if result is None and not field.null:
if result is None and not field.blank:
raise TypeError("Can't found file in %s for non nullable FileField" % field.upload_to)
return result

Expand Down

0 comments on commit 30be946

Please sign in to comment.