Export-fixtures with "Custom Scripts" leading to DuplicateEntryError

I have the following in hooks.py on my custom app:

fixtures = ["Custom Field", "Custom Script", 
            "Naming Series", "Property Setter",
            {"doctype": "DocType",
                        "filters": { "custom" : ["=", "1"] }

I currently have 4 custom scripts in my system.

After running bench export-fixtures and doing a bench migrate on my dev install or updating my production install with the same code, I get errors like the following:

frappe.exceptions.DuplicateEntryError: (u’Custom Script’, u’Account Programming-Client’, IntegrityError(1062, u"Duplicate entry ‘Account Programming-Client’ for key ‘PRIMARY’"))

It seems like the bench migrate that is performed during bench update or manually is trying to create additional scripts instead of updating the exisiting.

Thanks for any tips on how to clear this up.

I tried changing the “modified” dates in the custom_scripts.js file and got the same error. I finally removed the custom_scripts.js file and I was able to run bench update on the production box and bench migrate on the production box.

I’m fairly certain the system is supposed to allow exporting Custom Scripts to be used over and over just like other fixtures.

Is this a bug that needs to be filed?

Bump. I’ve been working on other things and I’m coming back to this. I’m hoping someone will have some input.

code worked for me by changing “Custom Script” to “Client Script”
thank u