Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profiles: Allow deleting rule_types if no profiles exist anymore #1131

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Oct 6, 2023

If no entity_profile_rules rows exist, we don't get an SQL errors, but a
slice of 0 values. This would have resulted in:

Details: cannot delete: rule type 58e93f07-ff77-4f11-8d6c-d9666a0348b3
is used by profiles

(Note that the message is trying to print which profiles by Join()-ing
the names, but all it has is an empty slices)

If no entity_profile_rules rows exist, we don't get an SQL errors, but a
slice of 0 values. This would have resulted in:
```
Details: cannot delete: rule type 58e93f07-ff77-4f11-8d6c-d9666a0348b3
is used by profiles
```

(Note that the message is trying to print which profiles by `Join()`-ing
the names, but all it has is an empty slices)
@JAORMX JAORMX merged commit 6d19cf6 into mindersec:main Oct 6, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants