-
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The extension uses a custom flag _sync_default_public_policy for the default public policy. However, after a custom policy is added which isn't related to a role (but assigned to a single user), the extension tries to save it as a second default public policy on a pull, which creates the error below:
insert into `directus_sync_id_map` (`local_id`, `sync_id`, `table`) values ('25c4d514-026a-400d-beeb-398b078b8ea6', '_sync_default_public_policy', 'policies') - Duplicate entry 'policies-_sync_default_public_policy' for key 'directus_sync_id_map_table_sync_id_unique'After adding the policy manually to the directus_sync_id_map table (keeping the id), everything works as expected.
To Reproduce
Steps to reproduce the behavior:
- Create a policy which isn't assigned to a role
- Run
directus-sync pull - See error
Expected behavior
Recognize that it's a user-related policy.
Versions (please complete the following information):
- Directus-Sync version: 3.0.3
- Directus version: 11.6.1
- Database: MySql
- Directus environment: Docker
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working