Fix selecting default label template (#5317)

This commit is contained in:
Miklós Márton 2023-07-23 09:09:41 +02:00 committed by GitHub
parent 4a211dd48d
commit feeccc5c91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,11 +91,11 @@ function selectLabel(labels, items, options={}) {
null, null,
function(item) { function(item) {
if (options.key == 'part') if (options.key == 'part')
return item.key == user_settings.DEFAULT_PART_LABEL_TEMPLATE; return item.pk == user_settings.DEFAULT_PART_LABEL_TEMPLATE;
else if (options.key == 'location') else if (options.key == 'location')
return item.key == user_settings.DEFAULT_LOCATION_LABEL_TEMPLATE; return item.pk == user_settings.DEFAULT_LOCATION_LABEL_TEMPLATE;
else if (options.key == 'stock') else if (options.key == 'stock')
return item.key == user_settings.DEFAULT_STOCK_LABEL_TEMPLATE; return item.pk == user_settings.DEFAULT_STOCK_LABEL_TEMPLATE;
return ''; return '';
} }
); );