débug
This commit is contained in:
@@ -230,7 +230,7 @@ def import_data_csv():
|
||||
value = line[key]
|
||||
if key == "dtDate":
|
||||
value = datetime.strptime(value, "%d.%m.%Y").date()
|
||||
elif key == "Student" and value is not "":
|
||||
elif key == "Student" and value != "":
|
||||
print(f"user == pk{value}")
|
||||
temp_user = User.objects.get(pk=int(value))
|
||||
setattr(new_eval, "Student", temp_user)
|
||||
@@ -240,7 +240,7 @@ def import_data_csv():
|
||||
|
||||
if key in ["nEval_Type","nInter_Priority","nInter_Nature","nInter_Complexity","nStudent_Role","nEval_Mode"]:
|
||||
print(f"key [{key}] => {value}")
|
||||
value = int(value) if value is not "" else ""
|
||||
value = int(value) if value != "" else ""
|
||||
|
||||
setattr(new_eval, key,value)
|
||||
print(f"try to save {line}")
|
||||
|
Reference in New Issue
Block a user