Conditional Fixutre Sync

Hello Team,
We need to control which Fixture To Run While the App Installs.
Currently, each app install overwrites any changes done in the doctype data with initial data which was exported in version 1 and is generated while exporting the fixture the first time.
We need someplace where we can check if LastModifiedDateTime is greater than existing record in DocType, then only re-import the data from Fixture else ignore/skip the re-import

Well, you can easily do an after_install hook to a method that creates the necessary records with any conditions you want to set.
You could try to os.path to the json file in the fixtures read it as a json and modify the content to create documents based on if the ID already exists to prevent duplicates or overwrites.

1 Like