Skip to content

Commit

Permalink
Remove console.log and simplify migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jmthomas committed Jan 9, 2025
1 parent 73ad8c7 commit f826f5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@ export default {
},
methods: {
save() {
console.log('save news feed', this.newsFeed)
this.saveSetting(settingName, this.newsFeed)
if (this.newsFeed) {
this.api.update_news()
}
},
parseSetting: function (response) {
console.log('parseSetting response', response)
this.newsFeed = response
},
},
Expand Down
6 changes: 2 additions & 4 deletions openc3/lib/openc3/migrations/20250108060000_news_feed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
module OpenC3
class NewsFeed < Migration
def self.run
ScopeModel.names.each do |scope|
setting = SettingModel.get(name: 'news_feed')
SettingModel.set({ name: 'news_feed', data: true }, scope: scope) unless setting
end
setting = SettingModel.get(name: 'news_feed')
SettingModel.set({ name: 'news_feed', data: true }, scope: 'DEFAULT') unless setting
end
end
end
Expand Down

0 comments on commit f826f5c

Please sign in to comment.