Ticket #1729: NullPath.diff
File NullPath.diff, 637 bytes (added by , 19 years ago) |
---|
-
db/models/base.py
282 282 return getattr(self, cachename) 283 283 284 284 def _get_FIELD_filename(self, field): 285 return os.path.join(settings.MEDIA_ROOT, getattr(self, field.attname)) 285 if getattr(self, field.attname): 286 return os.path.join(settings.MEDIA_ROOT, 287 getattr(self, field.attname)) 288 return '' 286 289 287 290 def _get_FIELD_url(self, field): 288 291 if getattr(self, field.attname): # value is not blank