Skip to content

Commit fbec6a1

Browse files
committed
Devin comments
1 parent 15707e9 commit fbec6a1

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

apps/obsidian/src/components/GeneralSettings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ const GeneralSettings = () => {
334334
<input
335335
type="text"
336336
value={username}
337-
onChange={(e) => void handleSetUsername(e.target.value)}
337+
onBlur={(e) => void handleSetUsername(e.target.value)}
338338
/>
339339
</div>
340340
</div>

apps/obsidian/src/utils/conceptConversion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export const relationInstanceToLocalConcept = ({
223223
space_id: context.spaceId,
224224
name: `[[${sourceNode.file.basename}]] -${relationType.label}-> [[${destinationNode.file.basename}]]`,
225225
source_local_id: relationInstanceData.id,
226-
author_id: relationInstanceData.authorId,
226+
author_id: relationInstanceData.authorId ?? context.userId,
227227
schema_represented_by_local_id: type,
228228
is_schema: false,
229229
created: new Date(created).toISOString(),

packages/database/supabase/migrations/20260421141140_select_platform_account_of_partial_space.sql

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,17 @@ WHERE id IN (
3939
JOIN public.my_user_accounts() ON (account_uid = my_user_accounts)
4040
WHERE permissions >= 'partial'
4141
);
42+
43+
CREATE OR REPLACE FUNCTION public.generic_entity_access(target_id BIGINT, target_type public."EntityType") RETURNS boolean
44+
STABLE SECURITY DEFINER
45+
SET search_path = ''
46+
LANGUAGE sql AS $$
47+
SELECT CASE
48+
WHEN target_type = 'Space' THEN public.in_space(target_id)
49+
WHEN target_type = 'Content' THEN public.content_in_space(target_id)
50+
WHEN target_type = 'Concept' THEN public.concept_in_space(target_id)
51+
WHEN target_type = 'Document' THEN public.document_in_space(target_id)
52+
WHEN target_type = 'PlatformAccount' THEN public.account_in_shared_space(target_id)
53+
ELSE false
54+
END;
55+
$$;

0 commit comments

Comments
 (0)