diff --git a/backend/internal/service/user_group_service.go b/backend/internal/service/user_group_service.go index 9b68af7..fa146ee 100644 --- a/backend/internal/service/user_group_service.go +++ b/backend/internal/service/user_group_service.go @@ -89,7 +89,6 @@ func (s *UserGroupService) Update(id string, input dto.UserGroupCreateDto, allow group.Name = input.Name group.FriendlyName = input.FriendlyName - group.LdapID = &input.LdapID if err := s.db.Preload("Users").Save(&group).Error; err != nil { if errors.Is(err, gorm.ErrDuplicatedKey) { diff --git a/backend/resources/migrations/postgres/20250120102531_fix_empy_ldap_id_string.down.sql b/backend/resources/migrations/postgres/20250120102531_fix_empty_ldap_id_string.down.sql similarity index 100% rename from backend/resources/migrations/postgres/20250120102531_fix_empy_ldap_id_string.down.sql rename to backend/resources/migrations/postgres/20250120102531_fix_empty_ldap_id_string.down.sql diff --git a/backend/resources/migrations/postgres/20250120102531_fix_empy_ldap_id_string.up.sql b/backend/resources/migrations/postgres/20250120102531_fix_empty_ldap_id_string.up.sql similarity index 100% rename from backend/resources/migrations/postgres/20250120102531_fix_empy_ldap_id_string.up.sql rename to backend/resources/migrations/postgres/20250120102531_fix_empty_ldap_id_string.up.sql diff --git a/backend/resources/migrations/postgres/20250203082527_fix_empty_user_group_ldap_id_string.down.sql b/backend/resources/migrations/postgres/20250203082527_fix_empty_user_group_ldap_id_string.down.sql new file mode 100644 index 0000000..14da374 --- /dev/null +++ b/backend/resources/migrations/postgres/20250203082527_fix_empty_user_group_ldap_id_string.down.sql @@ -0,0 +1 @@ +UPDATE user_groups SET ldap_id = '' WHERE ldap_id IS NULL; \ No newline at end of file diff --git a/backend/resources/migrations/postgres/20250203082527_fix_empty_user_group_ldap_id_string.up.sql b/backend/resources/migrations/postgres/20250203082527_fix_empty_user_group_ldap_id_string.up.sql new file mode 100644 index 0000000..87ee3e0 --- /dev/null +++ b/backend/resources/migrations/postgres/20250203082527_fix_empty_user_group_ldap_id_string.up.sql @@ -0,0 +1 @@ +UPDATE user_groups SET ldap_id = null WHERE ldap_id = ''; \ No newline at end of file diff --git a/backend/resources/migrations/sqlite/20250120102531_fix_empy_ldap_id_string.down.sql b/backend/resources/migrations/sqlite/20250120102531_fix_empty_ldap_id_string.down.sql similarity index 100% rename from backend/resources/migrations/sqlite/20250120102531_fix_empy_ldap_id_string.down.sql rename to backend/resources/migrations/sqlite/20250120102531_fix_empty_ldap_id_string.down.sql diff --git a/backend/resources/migrations/sqlite/20250120102531_fix_empy_ldap_id_string.up.sql b/backend/resources/migrations/sqlite/20250120102531_fix_empty_ldap_id_string.up.sql similarity index 100% rename from backend/resources/migrations/sqlite/20250120102531_fix_empy_ldap_id_string.up.sql rename to backend/resources/migrations/sqlite/20250120102531_fix_empty_ldap_id_string.up.sql diff --git a/backend/resources/migrations/sqlite/20250203082527_fix_empty_user_group_ldap_id_string.down.sql b/backend/resources/migrations/sqlite/20250203082527_fix_empty_user_group_ldap_id_string.down.sql new file mode 100644 index 0000000..14da374 --- /dev/null +++ b/backend/resources/migrations/sqlite/20250203082527_fix_empty_user_group_ldap_id_string.down.sql @@ -0,0 +1 @@ +UPDATE user_groups SET ldap_id = '' WHERE ldap_id IS NULL; \ No newline at end of file diff --git a/backend/resources/migrations/sqlite/20250203082527_fix_empty_user_group_ldap_id_string.up.sql b/backend/resources/migrations/sqlite/20250203082527_fix_empty_user_group_ldap_id_string.up.sql new file mode 100644 index 0000000..87ee3e0 --- /dev/null +++ b/backend/resources/migrations/sqlite/20250203082527_fix_empty_user_group_ldap_id_string.up.sql @@ -0,0 +1 @@ +UPDATE user_groups SET ldap_id = null WHERE ldap_id = ''; \ No newline at end of file