clear IPN field when duplicating part and PART_ALLOW_DUPLICATE_IPN is False (#4359) (#4365)

This commit is contained in:
simonkuehling 2023-02-19 21:17:00 +01:00 committed by GitHub
parent bf8a59c604
commit 2986f8d61a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -414,6 +414,11 @@ function duplicatePart(pk, options={}) {
data.is_template = false;
}
// Clear IPN field if PART_ALLOW_DUPLICATE_IPN is set to False
if (!global_settings['PART_ALLOW_DUPLICATE_IPN']) {
data.IPN = '';
}
constructForm('{% url "api-part-list" %}', {
method: 'POST',
fields: fields,