edit mistakes corrected

When clicking edit an item, an error was raised if the item didn't have
an exp.date.

when editing an item and fx. amount/unit was filled out wrong, then
instead of re-rendering edit page with error comments the add page was
rendered and a new item was added to db instead of just updating an
existing item.