small tweaks

This commit is contained in:
vabene1111
2025-04-18 13:48:41 +02:00
parent c1e56920ec
commit 4a9082b70c
3 changed files with 6 additions and 6 deletions

View File

@@ -77,11 +77,11 @@ for p in PLUGINS:
urlpatterns = [
path('setup/', views.setup, name='view_setup'),
path('no-group', views.no_groups, name='view_no_group'),
path('space-overview', views.space_overview, name='view_space_overview'),
path('no-group/', views.no_groups, name='view_no_group'),
path('space-overview/', views.space_overview, name='view_space_overview'),
path('space-manage/<int:space_id>', views.space_manage, name='view_space_manage'),
path('switch-space/<int:space_id>', views.switch_space, name='view_switch_space'),
path('no-perm', views.no_perm, name='view_no_perm'),
path('no-perm/', views.no_perm, name='view_no_perm'),
path('invite/<slug:token>', views.invite_link, name='view_invite'),
path('system/', views.system, name='view_system'),

View File

@@ -2006,7 +2006,7 @@ def reset_food_inheritance(request):
@api_view(['GET'])
# @schema(AutoSchema()) #TODO add proper schema
@permission_classes([CustomIsAdmin & CustomTokenHasReadWriteScope])
@permission_classes([CustomIsGuest & CustomTokenHasReadWriteScope])
# TODO add rate limiting
def switch_active_space(request, space_id):
"""

View File

@@ -274,7 +274,7 @@
</v-menu>
</v-btn>
</v-col>
<v-col cols="12" md="confirm">
<v-col cols="12" md="6">
<v-list>
<vue-draggable v-model="s.ingredients" group="ingredients" handle=".drag-handle" empty-insert-threshold="25">
<v-list-item v-for="i in s.ingredients" border>
@@ -757,7 +757,7 @@ function autoSortIngredients() {
ingredients.forEach(i => {
let found = false
importResponse.value.recipe!.steps.forEach(s => {
if (s.instruction.includes(i.food.name.trim()) && !found) {
if (s.instruction.toLowerCase().includes(i.food.name.trim().toLowerCase()) && !found) {
found = true
s.ingredients.push(i)
}