mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-30 09:50:51 +01:00
Fix Parent Page not found for null (ID: 0, parent_id: 0)
This commit is contained in:
parent
b9b77d3515
commit
bda19d759f
@ -283,22 +283,19 @@ public class CatalogManager {
|
||||
Emulator.getLogging().logSQLException(e);
|
||||
}
|
||||
|
||||
pages.forEachValue(new TObjectProcedure<CatalogPage>() {
|
||||
@Override
|
||||
public boolean execute(CatalogPage object) {
|
||||
CatalogPage page = pages.get(object.parentId);
|
||||
pages.forEachValue((object) -> {
|
||||
CatalogPage page = pages.get(object.parentId);
|
||||
|
||||
if (page != null) {
|
||||
if (page.id != object.id) {
|
||||
page.addChildPage(object);
|
||||
}
|
||||
} else {
|
||||
if (object.parentId != -2) {
|
||||
Emulator.getLogging().logStart("Parent Page not found for " + object.getPageName() + " (ID: " + object.id + ", parent_id: " + object.parentId + ")");
|
||||
}
|
||||
if (page != null) {
|
||||
if (page.id != object.id) {
|
||||
page.addChildPage(object);
|
||||
}
|
||||
} else {
|
||||
if (object.parentId != -2) {
|
||||
Emulator.getLogging().logStart("Parent Page not found for " + object.getPageName() + " (ID: " + object.id + ", parent_id: " + object.parentId + ")");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
this.catalogPages.putAll(pages);
|
||||
|
@ -9,6 +9,17 @@ import java.sql.SQLException;
|
||||
public class CatalogRootLayout extends CatalogPage {
|
||||
public CatalogRootLayout() {
|
||||
super();
|
||||
|
||||
this.id = -1;
|
||||
this.parentId = -2;
|
||||
this.rank = 0;
|
||||
this.caption = "root";
|
||||
this.pageName = "root";
|
||||
this.iconColor = 0;
|
||||
this.iconImage = 0;
|
||||
this.orderNum = -10;
|
||||
this.visible = true;
|
||||
this.enabled = true;
|
||||
}
|
||||
|
||||
public CatalogRootLayout(ResultSet set) throws SQLException {
|
||||
|
Loading…
Reference in New Issue
Block a user