This commit is contained in:
tdurieux
2026-05-04 11:30:42 +02:00
parent 96d9f3cee6
commit f91db91cee
6 changed files with 106 additions and 9 deletions
+10 -1
View File
@@ -365,7 +365,16 @@ router.post(
validateNewRepo(repoUpdate);
if (repoUpdate.source.commit != repo.model.source.commit) {
// Only the commit/branch backs the cached FileModel — anonymization
// options (terms, image/link toggles, etc.) are applied on the fly per
// request. Re-running the download queue is therefore only needed when
// the underlying snapshot moves. Other edits (e.g. turning off
// auto-update — see #360) just persist and return.
const sourceChanged =
repoUpdate.source.commit != repo.model.source.commit ||
repoUpdate.source.branch != repo.model.source.branch;
if (sourceChanged) {
repo.model.anonymizeDate = new Date();
repo.model.source.commit = repoUpdate.source.commit;
await repo.remove();