Skip to content

Commit

Permalink
don't import network models for initial run. postgres must be setup f…
Browse files Browse the repository at this point in the history
…irst.
  • Loading branch information
schakrava committed Feb 25, 2016
1 parent b7582d8 commit f02f435
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rockstor/scripts/initrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
from tempfile import mkstemp
from django.conf import settings
from system.pkg_mgmt import downgrade_pkgs
from storageadmin.views.network import NetworkMixin
from storageadmin.models import NetworkInterface


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -105,6 +103,10 @@ def init_update_issue():


def update_nginx(logger):
#importing here because, APIWrapper needs postgres to be setup, so
#importing at the top results in failure the first time. catch22.
from storageadmin.views.network import NetworkMixin
from storageadmin.models import NetworkInterface
nm = NetworkMixin()
nm._refresh_ni()
try:
Expand Down

0 comments on commit f02f435

Please sign in to comment.