- Rails.logger.info('[INFO] Adding publication: "' << match[1])
- Publication.find_or_create_by_name(:name => match[1],
- :source_file => self.path, :repository_id => self.changeset.repository.id )
+ if match
+ Rails.logger.info('[INFO] Adding publication: "' << match[1])
+ Publication.find_or_create_by_name(:name => match[1],
+ :source_file => self.path, :repository_id => self.changeset.repository.id )
+ end