Merge lp:~mpontillo/maas/bug-1450115-premature-db-access into lp:~maas-committers/maas/trunk

Proposed by Mike Pontillo
Status: Merged
Approved by: Mike Pontillo
Approved revision: no longer in the source branch.
Merged at revision: 3855
Proposed branch: lp:~mpontillo/maas/bug-1450115-premature-db-access
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
src/maasserver/forms_settings.py (+1/-1)
To merge this branch: bzr merge lp:~mpontillo/maas/bug-1450115-premature-db-access
Reviewer Review Type Date Requested Status
Raphaël Badin (community) Approve
Review via email: mp+257819@code.launchpad.net

Commit message

Fix bug #1450115 (database accessed too early, writes exception to the log)

To post a comment you must log in.
Revision history for this message
Raphaël Badin (rvb) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/forms_settings.py'
2--- src/maasserver/forms_settings.py 2015-04-28 20:59:26 +0000
3+++ src/maasserver/forms_settings.py 2015-04-29 20:39:12 +0000
4@@ -111,7 +111,7 @@
5 def make_dnssec_validation_field(*args, **kwargs):
6 """Build and return the make_dnssec_validation_field field."""
7 field = forms.ChoiceField(
8- initial=Config.objects.get_config('dnssec_validation'),
9+ initial=CONFIG_ITEMS['dnssec_validation']['default'],
10 choices=DNSSEC_VALIDATION_CHOICES,
11 error_messages={
12 'invalid_choice': compose_invalid_choice_text(