the date overlap condition is checked
changed the code for salving an error of uniqueness at cetegory