Added ERR_RECORD_EXISTS and made corresponding changes in models.py