def set_system_info(key, value):
 obj = None
 obj = meta.Session.query(SystemInfo).filter_by(key=key).first()
 if (obj and (obj.value == unicode(value))):
  return
 if (not obj):
  obj = SystemInfo(key, value)
 else:
  obj.value = unicode(value)
 from ckan.model import repo
 rev = repo.new_revision()
 rev.message = 'Set {0} setting in system_info table'.format(key)
 meta.Session.add(obj)
 meta.Session.commit()
 return True

def set_system_info ( key , value ) : obj = None obj = meta . Session . query ( SystemInfo ) . filter_by ( key = key ) . first ( ) if ( obj and ( obj . value == unicode ( value ) ) ) : return if ( not obj ) : obj = SystemInfo ( key , value ) else : obj . value = unicode ( value ) from ckan . model import repo rev = repo . new_revision ( ) rev . message = 'Set {0} setting in system_info table' . format ( key ) meta . Session . add ( obj ) meta . Session . commit ( ) return True
save data in the system_info table .