File obs-server-2.9-0106-Fix-rails-5.2.2-incompability.patch of Package obs-server

From d5c3aa0e3c3ea51c0e041851cb3576ca58371bd3 Mon Sep 17 00:00:00 2001
From: Stephan Kulow <coolo@suse.de>
Date: Thu, 6 Dec 2018 09:18:37 +0100
Subject: [PATCH] Fix rails 5.2.2 incompability

Overwrite update function in Configuration
---
 src/api/app/models/configuration.rb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/api/app/models/configuration.rb b/src/api/app/models/configuration.rb
index e16cb84e74..65965585d2 100644
--- a/src/api/app/models/configuration.rb
+++ b/src/api/app/models/configuration.rb
@@ -67,6 +67,11 @@ class Configuration < ApplicationRecord
       end
     end
 
+    # overwrite update function as the one in active record expects an id
+    def update(opts)
+      Configuration.first.update(opts)
+    end
+
     # Check if ldap group support is enabled?
     def ldapgroup_enabled?
       CONFIG['ldap_mode'] == :on && CONFIG['ldap_group_support'] == :on
-- 
2.25.3