1) added a user in the admin to change the user_id in report -- updated database!

2) removed double dictionary for fields in view.py
This commit is contained in:
Rupika 2019-02-04 18:02:32 -08:00
parent 08033fc117
commit 84aa01e008
2 changed files with 5 additions and 3 deletions

View file

@ -50,11 +50,13 @@ def get_fields(s_id):
queryset = Field.objects.filter(section_id=s_id)
# queryset = Field.objects.all()
for i in queryset:
data = {i.label: {
data = {
"field_name": "TODO",
"label": i.label,
"type": i.type,
"value": i.number,
}}
"number": i.number,
"value": "get_value",
}
# append the fields to array
# use copy() to avoid overwriting
field_set["fields"].append(data.copy())

Binary file not shown.