From: Guillaume Pellerin Date: Sat, 19 Jul 2014 21:18:20 +0000 (+0200) Subject: no uuid renaming (django makes the job) X-Git-Tag: 1.1~380 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=001efd2554c30dfe168c87ad2efd404b21a17ac3;p=teleforma.git no uuid renaming (django makes the job) --- diff --git a/teleforma/exam/models.py b/teleforma/exam/models.py index b40e22e4..6e5c8e95 100644 --- a/teleforma/exam/models.py +++ b/teleforma/exam/models.py @@ -294,9 +294,9 @@ class Script(BaseResource): new_abs = os.sep.join(old_abs_root) + os.sep + slugify(filename) + ext new_rel = os.sep.join(old_rel_root) + os.sep + slugify(filename) + ext - if os.path.exists(new_abs): - new_abs = os.sep.join(old_abs_root) + os.sep + slugify(filename) + '_' + unicode(self.uuid) + ext - new_rel = os.sep.join(old_rel_root) + os.sep + slugify(filename) + '_' + unicode(self.uuid) + ext + # if os.path.exists(new_abs): + # new_abs = os.sep.join(old_abs_root) + os.sep + slugify(filename) + '_' + unicode(self.uuid) + ext + # new_rel = os.sep.join(old_rel_root) + os.sep + slugify(filename) + '_' + unicode(self.uuid) + ext os.rename(old_abs, new_abs) self.file = new_rel