xjc 5 lat temu
rodzic
commit
9a6a3c2d8e
1 zmienionych plików z 1 dodań i 3 usunięć
  1. 1 3
      src/manage/controls.py

+ 1 - 3
src/manage/controls.py

@@ -130,8 +130,6 @@ def get_signup_info(request):
     if data.get("halfbody_img"):
         data["halfbody_img"] = data["halfbody_img"] + "?t=" + str(time.time())
     if data.get("oldcard_img"):
-        data["oldcard_img"] = data["education_img"] + "?t=" + str(time.time())
-    if data.get("ard_img"):
         data["oldcard_img"] = data["oldcard_img"] + "?t=" + str(time.time())
     return data
 
@@ -1423,7 +1421,7 @@ def download_zip(request):
                     "halfbody_img":InlineImage(doc,halfbody_img,height=Mm(40.97),width=Mm(28.91)),
                     "education_img":InlineImage(doc,education_img,height=Mm(82.5),width=Mm(140.66))
                     }
-            if oldcard_img:
+            if oldcard_img and o.train_type in [u"复审",u"换证"]:
                 context.update({
                     "oldcard_img":InlineImage(doc,oldcard_img,height=Mm(82.5),width=Mm(140.66))
                     })