Skip to content
Snippets Groups Projects

Feature/provenance

Merged Carlos Vega requested to merge feature/provenance into master
All threads resolved!
1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
@@ -38,9 +38,9 @@ class AppointmentForm(ModelForm):
new_value = ','.join([str(element.id) for element in new_value]) #overwrite variable
#old value
if self.instance.id: #update instance
previous_value = getattr(self.instance, field).all()
old_human_values = '; '.join([str(element) for element in previous_value])
previous_value = ','.join([str(element.id) for element in previous_value]) #overwrite variable
list_of_values = getattr(self.instance, field).all()
old_human_values = '; '.join([str(element) for element in list_of_values])
previous_value = ','.join([str(element.id) for element in list_of_values])
else: #new instance
old_human_values = ''
previous_value = ''
Loading