Created
September 16, 2011 10:23
-
-
Save sehmaschine/1221774 to your computer and use it in GitHub Desktop.
filebrowse-field: value needs to be a fileobject
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if value != "": | |
try: | |
value = FileObject(url_to_path(value)) | |
if value.is_version and VERSIONS_BASEDIR: | |
final_attrs['directory'] = os.path.split(value.original.path_relative)[0] | |
else: | |
final_attrs['directory'] = os.path.split(value.path_relative)[0] | |
except: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment