Merge pull request #16680 from gavindsouza/migrate-fix

fix: Check for required services running after frappe init
This commit is contained in:
gavin 2022-04-20 12:05:59 +05:30 committed by GitHub
commit 0a1b75c452
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -159,13 +159,13 @@ class SiteMigration:
"""Run Migrate operation on site specified. This method initializes
and destroys connections to the site database.
"""
if not self.required_services_running():
raise SystemExit(1)
if site:
frappe.init(site=site)
frappe.connect()
if not self.required_services_running():
raise SystemExit(1)
self.setUp()
try:
self.pre_schema_updates()