Skip to content

Commit

Permalink
fix business units
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveKueng authored and SteveKueng committed Feb 24, 2015
1 parent a61d0a5 commit 504a844
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions reports/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ def submit(request, submission_type):

report.runtype = submit.get('runtype')
report.timestamp = datetime.now()
unit = BusinessUnit.objects.get(hash=submit.get('unit'))
machine.businessunit = unit

if submit.get('unit'):
unit = BusinessUnit.objects.get(hash=submit.get('unit'))
machine.businessunit = unit

if submission_type == 'postflight':
report.runstate = u"done"
Expand Down
4 changes: 3 additions & 1 deletion scripts/munkiwebadmin-config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ MWA_HOST="http://localhost:8000"
username="reportuser"
password="report"

businessunit="cc78c783-047f-4713-af03-f77528e997b3"
# add the businessunit hash if you use business units. Otherways leaf it empty
businessunit="8dd857d2-2c5d-4943-a6c2-62812d266820"

# The optional name of your SSL certificate to use when communicating with
# Munki Web Admin. If you place the certificate in the same directory as this
# script, you don't need to include the full path.
Expand Down

0 comments on commit 504a844

Please sign in to comment.