fix error
This commit is contained in:
parent
7568aaafaf
commit
5758a91865
|
@ -18,7 +18,7 @@ class ArchiveFile
|
|||
before_save do
|
||||
cat = self.category rescue nil
|
||||
if cat && ArchiveCategory.where(:category_id => cat.id).count==0
|
||||
ArchiveCategory.create(category_id: cat.id.to_s)
|
||||
ArchiveCategory.create(category_id: cat.id.to_s,sort_number: cat.sort_number)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue