Issue #2 resolved

PrivateFileField constructor ignores condition callable parameter

Bernardo Cabezas Serra
created an issue

Hello, There is a typo in constructor, that makes object ignore the //condition// parameter.

Here is the simple patch that worked for me. Regards, Bernardo


{{{ diff -r 88ac49621de3 private_files/models/fields.py --- a/private_files/models/fields.py Thu Mar 24 11:45:42 2011 +0100 +++ b/private_files/models/fields.py Thu May 19 10:53:14 2011 +0200 @@ -38,5 +38,5 @@

 def __init__(self, verbose_name=None, name=None, upload_to='', storage=None, condition = is_user_authenticated, attachment = True, **kwargs):
     super(PrivateFileField, self).__init__(verbose_name, name, upload_to, storage, **kwargs)
  • self.condition = is_user_authenticated
  • self.condition = condition self.attachment = attachment }}}

Comments (2)

  1. Log in to comment