Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #1729 -- Changed get_FIELD_filename() to return an empty string…

… when field fiel's value is null. Thanks, rhettg@gmail.com

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 775c06a959bfd1e156810b632604abf845f11be8 1 parent adf6126
Adrian Holovaty authored May 05, 2006
1  AUTHORS
@@ -97,6 +97,7 @@ answer newbie questions, and generally made Django that much better:
97 97
     Daniel Poelzleithner <http://poelzi.org/>
98 98
     J. Rademaker
99 99
     Brian Ray <http://brianray.chipy.org/>
  100
+    rhettg@gmail.com
100 101
     Oliver Rutherfurd <http://rutherfurd.net/>
101 102
     Ivan Sagalaev (Maniac) <http://www.softwaremaniacs.org/>
102 103
     David Schein
4  django/db/models/base.py
@@ -281,7 +281,9 @@ def _get_next_or_previous_in_order(self, is_next):
281 281
         return getattr(self, cachename)
282 282
 
283 283
     def _get_FIELD_filename(self, field):
284  
-        return os.path.join(settings.MEDIA_ROOT, getattr(self, field.attname))
  284
+        if getattr(self, field.attname): # value is not blank
  285
+            return os.path.join(settings.MEDIA_ROOT, getattr(self, field.attname))
  286
+        return ''
285 287
 
286 288
     def _get_FIELD_url(self, field):
287 289
         if getattr(self, field.attname): # value is not blank

0 notes on commit 775c06a

Please sign in to comment.
Something went wrong with that request. Please try again.