Skip to content

Commit dbe048a

Browse files
committed
Prevent self-referential type names
1 parent 675b43e commit dbe048a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/models/name.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ def type?
878878
end
879879

880880
def type_is_name?
881-
type? && nomenclatural_type_type == 'Name'
881+
type? && nomenclatural_type_type == 'Name' && nomenclatural_type_id != id
882882
end
883883

884884
def type_is_genome?

0 commit comments

Comments
 (0)