diff --git a/backend/server/integrations/views.py b/backend/server/integrations/views.py index 35e5551..36739b8 100644 --- a/backend/server/integrations/views.py +++ b/backend/server/integrations/views.py @@ -297,7 +297,7 @@ class ImmichIntegrationView(viewsets.ViewSet): is_authorized = True # Level 3: Owner access - elif request.user.is_authenticated and request.user.id == owner_id: + elif request.user.is_authenticated and request.user == owner_id: is_authorized = True # Level 4: Shared collection access - check if user has access to any collection @@ -314,7 +314,7 @@ class ImmichIntegrationView(viewsets.ViewSet): }, status=status.HTTP_403_FORBIDDEN) else: # No LocationImage exists; allow only the integration owner - if not request.user.is_authenticated or request.user.id != owner_id: + if not request.user.is_authenticated or request.user != owner_id: return Response({ 'message': 'Image is not linked to any location and you are not the owner.', 'error': True, diff --git a/frontend/src/lib/components/ImmichSelect.svelte b/frontend/src/lib/components/ImmichSelect.svelte index 66fc139..3f79964 100644 --- a/frontend/src/lib/components/ImmichSelect.svelte +++ b/frontend/src/lib/components/ImmichSelect.svelte @@ -12,7 +12,7 @@ let immichNextURL: string = ''; let loading = false; - export let adventure: Location | null = null; + export let location: Location | null = null; export let copyImmichLocally: boolean = false; const dispatch = createEventDispatcher(); @@ -21,7 +21,7 @@ let currentAlbum: string = ''; let selectedDate: string = - (adventure as Location | null)?.visits + (location as Location | null)?.visits .map((v) => new Date(v.end_date || v.start_date)) .sort((a, b) => +b - +a)[0] ?.toISOString() @@ -57,8 +57,8 @@ } async function saveImmichRemoteUrl(imageId: string) { - if (!adventure) { - console.error('No adventure provided to save the image URL'); + if (!location) { + console.error('No location provided to save the image URL'); return; } let res = await fetch('/api/images', { @@ -68,7 +68,7 @@ }, body: JSON.stringify({ immich_id: imageId, - adventure: adventure.id + location: location.id }) }); if (res.ok) { diff --git a/frontend/src/lib/components/LocationModal.svelte b/frontend/src/lib/components/LocationModal.svelte index 2f38bac..e2e5d71 100644 --- a/frontend/src/lib/components/LocationModal.svelte +++ b/frontend/src/lib/components/LocationModal.svelte @@ -847,7 +847,7 @@ {#if immichIntegration} { url = e.detail; fetchImage();