Skip to content

Commit

Permalink
i
Browse files Browse the repository at this point in the history
  • Loading branch information
tlocke committed Sep 4, 2023
1 parent 3408e1d commit 86133a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 5 additions & 4 deletions chellow/e/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3894,11 +3894,12 @@ def site_add_e_supply_form_get(site_id):
.where(MarketRole.code == "R")
.order_by(Party.dno_code)
).all()
if "dno_id" in request.values:
dno_id = req_int("dno_id")
dno = Party.get_by_id(g.sess, dno_id)
else:
dno_id = req_int_none("dno_id")
if dno_id is None:
dno = dnos[0]
else:
dno = Party.get_by_id(g.sess, dno_id)

participant = dno.participant

if pc.code == "00":
Expand Down
4 changes: 3 additions & 1 deletion chellow/templates/e/site_add_e_supply.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
<form action="/e/sites/{{site.id}}/add_e_supply" method="post">
<fieldset hx-get="/e/sites/{{site.id}}/add_e_supply/form" hx-params="*"
hx-trigger="load, change"
hx-include="[name='source_id'],[name='start_year'],[name='start_month'],[name='start_day'],[name='start_hour'],[name='start_minute'],[name='pc_id'],[name='name'],[name='imp_mpan_core'],[name='exp_mpan_core'],[name='mop_account'],[name='dc_account'],[name='dc_contract_id'],[name='mop_contract_id'],[name='imp_supplier_account'],[name='exp_supplier_account'],[name='imp_llfc_id'],[name='exp_llfc_id'],[name='mtc_participant_id'],[name='has_imp_mpan'],[name='has_exp_mpan']">
hx-include="[name='source_id'],[name='start_year'],[name='start_month'],[name='start_day'],[name='start_hour'],[name='start_minute'],[name='pc_id'],[name='name'],[name='imp_mpan_core'],[name='exp_mpan_core'],[name='mop_account'],[name='dc_account'],[name='dc_contract_id'],[name='mop_contract_id'],[name='imp_supplier_account'],[name='exp_supplier_account'],[name='imp_llfc_id'],[name='exp_llfc_id'],[name='mtc_participant_id'],[name='has_imp_mpan'],[name='has_exp_mpan'],[name='dno_id'],[name='gsp_group_id']">
<input type="hidden" name="source_id" value="{{request.values.source_id}}">
<input type="hidden" name="pc_id" value="{{request.values.pc_id}}">
<input type="hidden" name="dno_id" value="{{request.values.dno_id}}">
<input type="hidden" name="gsp_group_id" value="{{request.values.gsp_group_id}}">
<input type="hidden" name="mtc_participant_id"
value="{{request.values.mtc_participant_id}}">
<input type="hidden" name="name" value="{{request.values.name}}">
Expand Down

0 comments on commit 86133a0

Please sign in to comment.