fix error update postgresql database owner
This commit is contained in:
parent
fde6cbd9cd
commit
c0413f7deb
@ -75,8 +75,8 @@ public class PgSqlDatabaseModuleImpl extends AbstractModuleImpl {
|
||||
Transaction transaction = getTransaction();
|
||||
EntityManager em = transaction.getEntityManager();
|
||||
UnixUser unixUser = transaction.getLoginUser();
|
||||
MySqlDatabase detachtedDB = (MySqlDatabase) existingEntity;
|
||||
MySqlDatabase attachedDB = em.find(MySqlDatabase.class, detachtedDB.getId());
|
||||
PgSqlDatabase detachtedDB = (PgSqlDatabase) existingEntity;
|
||||
PgSqlDatabase attachedDB = em.find(PgSqlDatabase.class, detachtedDB.getId());
|
||||
if (!attachedDB.getName().equals(detachtedDB.getName())) {
|
||||
throw new AuthorisationException(unixUser, "update", existingEntity, "name");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user