[s3boto] self.content.file and self.content.url do not work if self.pk is None where self.content is a FileField
When trying to get self.content.url or self.content.file from within a model where self.content is a FileField before self.pk exists, the operation hangs. It should return False or something else.
(Pdb) self.content.file
^C*** SystemExit: Keyboard Interrupt
(Pdb) self.pk
None
(Pdb)
Comments (7)
-
adamnelson
-
BeProud
-
assigned issue to
Ian Lewis
-
assigned issue to
-
BeProud
Just making sure, but you do mean the s3boto backend right?
-
adamnelson
I was using the s3boto backend, yes.
-
Ian Lewis
-
assigned issue to
Ian Lewis
-
assigned issue to
-
Ian Lewis
- changed title to [s3boto] self.content.file and self.content.url do not work if self.pk is None where self.content is a FileField
-
Ian Lewis
- changed status to resolved
I believe this is working now. If not please re-open the ticket.
- Log in to comment »
self.content.url is fixed in the change in
#44. url() doesn't require the file's actual existence to generate the url, just the name and parameters from the boto connection object.