Closed kaligrafy closed 3 months ago
The error you mentioned is not related, I'll open an issue for it. But saving a node without a name should not be allowed. Or should it? Now, it is possible to save a node without name or code
We need to think about this, should we allow nodes with no name? It could be useful in auto-generated nodes or just for testing purposes...
Turns out about the name, there is a preference transit.nodes.nameIsRequired
to force require... anyhow, we still have to decide if we want the code to be mandatory.
As for the current issue, the problem of not saving is because the node has not changed since its creation and cannot be saved! If the object is new, it should be possible to consider it as changed, even if there is no history on the object. The validate method of objects will ensure that the object's initial default values are ok to be saved. In the case of a node, it is created with its precise geography, so a new node is valid.
Nice catch!
Server logs: An error occurred while getting nodes associated path ids: Cannot get nodes associated path ids from tables tr_transit_nodes and tr_transit_paths (error: The number of nodes received do not match the number of nodes sent in the query (DBQNGAP0003)) (DBQNGAP0004)
Now it is impossible to save a new node, even after running refresh transferable nodes. In fact, if you create a new node with a name, it works, but any new node without name, it will just silently ignore the save