Added missing assignment

I notice that it was missing an assignment in the `edit()` method, this creates a bug where when you edit an item, it is saved as a new record.