Skip to content

Commit

Permalink
Merge pull request #1677 from saurabh6790/shf
Browse files Browse the repository at this point in the history
chore: commit server records while setting hybrid servers
  • Loading branch information
saurabh6790 authored Jun 27, 2024
2 parents e2d3cb9 + 34bc7d5 commit f872af5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions press/press/doctype/self_hosted_server/self_hosted_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ def create_database_server(self):
if not frappe.flags.in_test:
db_server.create_dns_record()

frappe.db.commit()

frappe.msgprint(f"Databse server record {db_server.name} created")
except Exception:
frappe.throw("Adding Server to Database Server Doctype failed")
Expand Down Expand Up @@ -447,6 +449,8 @@ def create_application_server(self):
if not frappe.flags.in_test:
server.create_dns_record()

frappe.db.commit()

except Exception as e:
self.status = "Broken"
frappe.throw("Server Creation Error", exc=e)
Expand Down

0 comments on commit f872af5

Please sign in to comment.