|
|
@@ -4638,5 +4638,9 @@ class System_Photo_Save(ListView):
|
|
|
def post(self,request):
|
|
|
pic_1 = request.POST.get('pic_1')
|
|
|
pic_2 = request.POST.get('pic_2')
|
|
|
- SystemPhoto.objects.create(pic_1=pic_1,pic_2=pic_2)
|
|
|
+ if pic_1:
|
|
|
+ name = pic_1
|
|
|
+ elif pic2:
|
|
|
+ name = pic_2
|
|
|
+ SystemPhoto.objects.create(name=name,pic_1=pic_1,pic_2=pic_2)
|
|
|
return HttpResponse("1")
|