Skip to content

Commit

Permalink
MiqReport::ImportExport.export_to_array method was modifyied to add 2…
Browse files Browse the repository at this point in the history
… attributes which are not present in the MqReport model: 'userid' and 'group_description'.

We need those attributes to import saved report in mutiregion environment, BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1638533.
To make sure that MiqReport#update_attributes(saved_report_atributes) will not raise error, we need to implement stub for assignment method for those added attributes
  • Loading branch information
yrudman committed Jan 9, 2019
1 parent 02cb533 commit 98b2e8c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/models/miq_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,16 @@ def self.display_name(number = 1)
n_('Report', 'Reports', number)
end

def userid=(_userid)
# there are no MiqReport.userid and MiqReport.group_description attributes and after adding 'userid'
# and 'group_description' to a saved report, we need this stub to allow mass assignment
# when updating attrbutes using saved output from MiqReport::ImportExport#export_to_array
end

def group_description=(_group_description)
# need this stub to allow mass assignment when updating attrbutes
end

private

def va_sql_cols
Expand Down

0 comments on commit 98b2e8c

Please sign in to comment.