import frappe

def execute():
	frappe.db.set_value("System Settings", "System Settings", "document_share_key_expiry", 30)
	frappe.db.set_value("System Settings", "System Settings", "allow_older_web_view_links", 1)

import frappe

def execute():
	frappe.db.set_value("System Settings", "System Settings", {
		"document_share_key_expiry": 30,
		"allow_older_web_view_links": 1
	})

Set values in a single query
refactor: Set values in a single query

  import frappe
  
  def execute():
- 	frappe.db.set_value("System Settings", "System Settings", "document_share_key_expiry", 30)
+ 	frappe.db.set_value("System Settings", "System Settings", {
- 	frappe.db.set_value("System Settings", "System Settings", "allow_older_web_view_links", 1)
+ 		"document_share_key_expiry": 30,
+ 		"allow_older_web_view_links": 1
+ 	})
  
Set values in a single query
## Code Before:
import frappe

def execute():
	frappe.db.set_value("System Settings", "System Settings", "document_share_key_expiry", 30)
	frappe.db.set_value("System Settings", "System Settings", "allow_older_web_view_links", 1)

## Instruction:
Set values in a single query
## Code After:
import frappe

def execute():
	frappe.db.set_value("System Settings", "System Settings", {
		"document_share_key_expiry": 30,
		"allow_older_web_view_links": 1
	})
