We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6d9163 commit 0a37697Copy full SHA for 0a37697
lib/tasks/discourse_nntp_bridge.rake
@@ -20,6 +20,12 @@ namespace :discourse_nntp_bridge do
20
begin
21
print "Newsgroup: "
22
input = STDIN.gets.strip.downcase
23
+ duplicates = CategoryCustomField.where(name: "nntp_bridge_newsgroup", value: input)
24
+ if duplicates.count > 0
25
+ duplicate_names = "'" + duplicates.map(&:category).map(&:full_slug).join("' and '") + "'"
26
+ puts "#{input} is already assigned to #{duplicate_names}"
27
+ redo
28
+ end
29
end until newsgroups.include?(input)
30
31
CategoryCustomField.create!(
0 commit comments