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:
		
							parent
							
								
									08033fc117
								
							
						
					
					
						commit
						84aa01e008
					
				
					 2 changed files with 5 additions and 3 deletions
				
			
		|  | @ -50,11 +50,13 @@ def get_fields(s_id): | ||||||
|     queryset = Field.objects.filter(section_id=s_id) |     queryset = Field.objects.filter(section_id=s_id) | ||||||
|     # queryset = Field.objects.all() |     # queryset = Field.objects.all() | ||||||
|     for i in queryset: |     for i in queryset: | ||||||
|         data = {i.label: { |         data = { | ||||||
|  |             "field_name": "TODO", | ||||||
|             "label": i.label, |             "label": i.label, | ||||||
|             "type": i.type, |             "type": i.type, | ||||||
|             "value": i.number, |             "number": i.number, | ||||||
|         }} |             "value": "get_value", | ||||||
|  |         } | ||||||
|         # append the fields to array |         # append the fields to array | ||||||
|         # use copy() to avoid overwriting |         # use copy() to avoid overwriting | ||||||
|         field_set["fields"].append(data.copy()) |         field_set["fields"].append(data.copy()) | ||||||
|  |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								back/db.sqlite3
									
										
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								back/db.sqlite3
									
										
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Rupika
						Rupika