removed number, id, and completed attributes from the JSON data section
This commit is contained in:
parent
432e48fddc
commit
87a3074b16
1 changed files with 1 additions and 6 deletions
|
@ -1,10 +1,8 @@
|
||||||
from rest_framework.decorators import api_view, parser_classes
|
from rest_framework.decorators import api_view
|
||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
from .models import *
|
from .models import *
|
||||||
from .policy import pol
|
from .policy import pol
|
||||||
import os
|
import os
|
||||||
from rest_framework.exceptions import ParseError
|
|
||||||
from rest_framework.parsers import FileUploadParser, MultiPartParser
|
|
||||||
|
|
||||||
def get_report(report_pk):
|
def get_report(report_pk):
|
||||||
"""
|
"""
|
||||||
|
@ -81,13 +79,10 @@ def get_fields(s_id):
|
||||||
# function that gets the corresponding datatype
|
# function that gets the corresponding datatype
|
||||||
value = Field.get_datatype(i)
|
value = Field.get_datatype(i)
|
||||||
data = {
|
data = {
|
||||||
"completed": i.completed,
|
|
||||||
"field_name": i.field_name,
|
"field_name": i.field_name,
|
||||||
"label": i.label,
|
"label": i.label,
|
||||||
"field_type": i.field_type,
|
"field_type": i.field_type,
|
||||||
"number": i.number,
|
|
||||||
"value": value,
|
"value": value,
|
||||||
"id": i.id,
|
|
||||||
}
|
}
|
||||||
# append the fields to array
|
# append the fields to array
|
||||||
# use copy() to avoid overwriting
|
# use copy() to avoid overwriting
|
||||||
|
|
Loading…
Reference in a new issue