fix a parent id display bug in edit/create modal

when there is no parent, it showed parent id as 0 instead of none.