- if self.uuid_was.nil? or self.uuid_was == ""
- if self.uuid.is_a?(String) and self.uuid.length > 0 and current_user.andand.is_admin
- if (re = self.uuid.match HasUuid::UUID_REGEX)
- if re[1] == self.class.uuid_prefix
- return true
- else
- self.errors.add(:uuid, "Matched uuid type '#{re[1]}', expected '#{self.class.uuid_prefix}'")
- return false
- end
+ if current_user.andand.is_admin and self.uuid.is_a?(String)
+ if (re = self.uuid.match HasUuid::UUID_REGEX)
+ if re[1] == self.class.uuid_prefix
+ return true