You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use modelclone to duplicate an object where two fields are required and need to be unique. I'm using the exact setup explained in the readme and am able to get a prepopulated modelform. Without changing anything and trying to save, I get the correct validation response, where it denies the save because the data is exactly the same as a database object. If I change the two fields that are required for the change I get the following error:
""<Pattern: 1,2,3-benzotriazole_NEWTEST>" needs to have a value for field "pattern" before this many-to-many relationship can be used." and the traceback points to:
PATH/python2.7/site-packages/modelclone/admin.py in clone_view
ModelForm = self.get_form(request)
formsets = []
if request.method == 'POST':
form = ModelForm(request.POST, request.FILES)
if form.is_valid():
new_object = self.save_form(request, form, change=False) ...
form_validated = True
else:
new_object = self.model()
form_validated = False
prefixes = {}
Where the field "pattern" is a text field. Has anyone experienced this?
Thanks
--Nick
The text was updated successfully, but these errors were encountered:
Hi there,
I'm trying to use modelclone to duplicate an object where two fields are required and need to be unique. I'm using the exact setup explained in the readme and am able to get a prepopulated modelform. Without changing anything and trying to save, I get the correct validation response, where it denies the save because the data is exactly the same as a database object. If I change the two fields that are required for the change I get the following error:
""<Pattern: 1,2,3-benzotriazole_NEWTEST>" needs to have a value for field "pattern" before this many-to-many relationship can be used." and the traceback points to:
PATH/python2.7/site-packages/modelclone/admin.py in clone_view
ModelForm = self.get_form(request)
formsets = []
if request.method == 'POST':
form = ModelForm(request.POST, request.FILES)
if form.is_valid():
new_object = self.save_form(request, form, change=False) ...
form_validated = True
else:
new_object = self.model()
form_validated = False
prefixes = {}
Where the field "pattern" is a text field. Has anyone experienced this?
Thanks
--Nick
The text was updated successfully, but these errors were encountered: