[nodestory] fix INSERT function so that it is performed only...

...when node_id exists in the DB

Warning: this silently avoids insertion of patches when node_id is
missing for some reason in the history.
parent b3126623
Pipeline #3606 failed with stage
in 53 minutes and 43 seconds