This small merge request changes form_handlers.db_store.run and form_handlers.db_store.save_form_data_entry.
It changes form_handlers.db_store.run return signature:
from None to (True, instance of fobi.contrib.plugins.form_handler.db_store.models.SavedFormDataEntry)
The reason I want this
I have a booking, which customers can make using an 'intake form'.
It looks like:
class Booking(models.Model):
primary_key = models.CharField(primary_key=True, max_length=idgen_len, default=idgen)
customer = models.ForeignKey(Customer, on_delete=models.CASCADE, related_name='customer')
form = models.ForeignKey(SavedFormDataEntry, on_delete=models.CASCADE, related_name='form')
event_type = models.ForeignKey(EventType, on_delete=models.CASCADE, related_name='event_type')
# ... other fields
I store the forms using this db_store plugin, and want to reference them.
With the changes, I can do this:
Description
This small merge request changes
form_handlers.db_store.run
andform_handlers.db_store.save_form_data_entry
. It changesform_handlers.db_store.run
return signature:The reason I want this
I have a booking, which customers can make using an 'intake form'. It looks like:
I store the forms using this
db_store
plugin, and want to reference them. With the changes, I can do this: