Commit 7d29d06d by Jon Yurek

Added patch from Tekin Suleyman regarding primary keys in the refresh task

parent ff6e8485
...@@ -17,7 +17,7 @@ end ...@@ -17,7 +17,7 @@ end
def for_all_attachments def for_all_attachments
klass = obtain_class klass = obtain_class
names = obtain_attachments names = obtain_attachments
ids = klass.connection.select_values("SELECT id FROM #{klass.table_name}") ids = klass.connection.select_values("SELECT #{klass.primary_key} FROM #{klass.table_name}")
ids.each do |id| ids.each do |id|
instance = klass.find(id) instance = klass.find(id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment