Skip to content

Commit

Permalink
fix: Avoid settings conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
paultranvan committed Feb 22, 2023
1 parent 0429bb4 commit ded14bc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/photos/lib/onPhotoUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const clusterizePhotos = async (client, setting, dataset, albums) => {
if (clusterize) {
for (const [clusterAlbums, photos] of clusterize.entries()) {
// Retrieve the relevant parameters to compute this cluster
const params = getMatchingParameters(setting.parameters, photos)
const params = getMatchingParameters(newSetting.parameters, photos)
const paramsMode = getDefaultParametersMode(params)
if (!paramsMode) {
log('warn', 'No parameters for clustering found')
Expand All @@ -82,7 +82,12 @@ const clusterizePhotos = async (client, setting, dataset, albums) => {
clusterAlbums,
photos
)
newSetting = await updateParamsPeriod(client, setting, params, dataset)
newSetting = await updateParamsPeriod(
client,
newSetting,
params,
dataset
)
}
} else {
return
Expand Down

0 comments on commit ded14bc

Please sign in to comment.