removed duplicated function
Fixed the has_field declaration for trigger