Closed rebmizrahi closed 11 months ago
Instead of changing the sample data repo, I deleted the submodule reference which is why there are 2.5K changed files... the only ones that have been changed are 2 out of the 3 work_source_adder.py files (and signals.py, I removed an incorrect comment). The only changes were adding work.save() lower in the file.
Adding sample data would create a MusicalWork object and save it, then create a composer + ContributionMusicalWork. MusicalWork objects are indexed when saved, i.e. before composer or genre etc. are associated to it. This fix saves the MusicalWork again after all data has been added so it is reindexed with the right data.