chellow 1724416862.0.0__py3-none-any.whl → 1724751676.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of chellow might be problematic. Click here for more details.

chellow/e/views.py CHANGED
@@ -4012,7 +4012,8 @@ def site_energy_management_get(site_id):
4012
4012
  now = utc_datetime_now()
4013
4013
  last_month = now - relativedelta(months=1)
4014
4014
 
4015
- eras = g.sess.execute(
4015
+ supply_dicts = []
4016
+ for era in g.sess.scalars(
4016
4017
  select(Era)
4017
4018
  .join(SiteEra)
4018
4019
  .join(Supply)
@@ -4022,12 +4023,16 @@ def site_energy_management_get(site_id):
4022
4023
  Era.finish_date == null(),
4023
4024
  Party.dno_code != "88",
4024
4025
  )
4025
- ).scalars()
4026
+ ):
4027
+ first_era = g.sess.scalars(
4028
+ select(Era).where(Era.supply == era.supply).order_by(Era.start_date)
4029
+ ).first()
4030
+ supply_dicts.append({"last_era": era, "first_era": first_era})
4026
4031
 
4027
4032
  return render_template(
4028
4033
  "em_site.html",
4029
4034
  site=site,
4030
- eras=eras,
4035
+ supply_dicts=supply_dicts,
4031
4036
  now=now,
4032
4037
  last_month=last_month,
4033
4038
  )
chellow/models.py CHANGED
@@ -4865,7 +4865,7 @@ class SiteGroup:
4865
4865
  if resolve_1_start is not None:
4866
4866
  self.delete_snag(
4867
4867
  sess,
4868
- SiteGroup.EXPORT_GROSS_GT_IMPORT_GEN,
4868
+ SiteGroup.EXPORT_GRID_GT_IMPORT_GEN,
4869
4869
  resolve_1_start,
4870
4870
  resolve_1_finish,
4871
4871
  )
@@ -22,6 +22,7 @@
22
22
  <tr>
23
23
  <th>View</th>
24
24
  <th>Name</th>
25
+ <th>From</th>
25
26
  <th>Source</th>
26
27
  <th>Generator Type</th>
27
28
  <th>DNO</th>
@@ -34,24 +35,26 @@
34
35
  </tr>
35
36
  </thead>
36
37
  <tbody>
37
- {% for era in eras %}
38
- {% set supply = era.supply %}
38
+ {% for supply_dict in supply_dicts %}
39
+ {% set last_era = supply_dict.last_era %}
40
+ {% set supply = last_era.supply %}
39
41
  <tr>
40
42
  <td>
41
43
  <a href="/e/supplies/{{supply.id}}">view</a>
42
44
  </td>
43
45
  <td>{{supply.name}}</td>
46
+ <td>{{supply_dict.first_era.start_date|hh_format}}</td>
44
47
  <td>{{supply.source.code}}</td>
45
48
  <td>{{supply.generator_type.code}}</td>
46
49
  <td><a href="/dnos/{{supply.dno.id}}">{{supply.dno.dno_code}}</a></td>
47
50
  <td>
48
- {% if era.imp_mpan_core %}
49
- {{era.imp_mpan_core}}
51
+ {% if last_era.imp_mpan_core %}
52
+ {{last_era.imp_mpan_core}}
50
53
  {% endif %}
51
54
  </td>
52
55
  <td>
53
- {% if era.exp_mpan_core %}
54
- {{era.exp_mpan_core}}
56
+ {% if last_era.exp_mpan_core %}
57
+ {{last_era.exp_mpan_core}}
55
58
  {% endif %}
56
59
  </td>
57
60
  <td>
@@ -70,8 +73,8 @@
70
73
  <a href="/reports/5/output/?site_id={{osite.id}}">{{osite.code}}</a>
71
74
  {% endfor %}
72
75
  </td>
73
- <td>{{era.meter_category}}</td>
74
- <td>{{era.msn}}</td>
76
+ <td>{{last_era.meter_category}}</td>
77
+ <td>{{last_era.msn}}</td>
75
78
  </tr>
76
79
  {% endfor %}
77
80
  </tbody>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chellow
3
- Version: 1724416862.0.0
3
+ Version: 1724751676.0.0
4
4
  Summary: Web Application for checking UK energy bills.
5
5
  Project-URL: Homepage, https://github.com/WessexWater/chellow
6
6
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
@@ -5,7 +5,7 @@ chellow/commands.py,sha256=ESBe9ZWj1c3vdZgqMZ9gFvYAB3hRag2R1PzOwuw9yFo,1302
5
5
  chellow/dloads.py,sha256=dixp-O0MF2_mlwrnKx3D9DH09Qu05BjTo0rZfigTjR4,5534
6
6
  chellow/edi_lib.py,sha256=alu20x9ZX06iPfnNI9dEJzuP6RIf4We3Y_M_bl7RrcY,51789
7
7
  chellow/general_import.py,sha256=l3EHq9zG9Vfl5Ee6XTVrC1nusXo4YGGB4VBmZ_JaJR8,65798
8
- chellow/models.py,sha256=rQLMIpGqFQk0fm7SQsAJbb51j3OM55e-4-MVfh0mBAc,243511
8
+ chellow/models.py,sha256=YtU1lnJWdNKB4z5shDsNXSHJROpiuuJ5K5UUH-X22to,243510
9
9
  chellow/national_grid.py,sha256=czwIZqzJndSGhEMQ5YzI6hRBhvjkM6VRVYXybf4_KXg,4377
10
10
  chellow/proxy.py,sha256=cVXIktPlX3tQ1BYcwxq0nJXKE6r3DtFTtfFHPq55HaM,1351
11
11
  chellow/rate_server.py,sha256=fg-Pf_9Hk3bXmC9riPQNGQxBvLvBa_WtNYdwDCjnCSg,5678
@@ -38,7 +38,7 @@ chellow/e/system_price.py,sha256=6w5J7bzwFAZubE2zdOFRiS8IIrVP8hkoIOaG2yCt-Ic,623
38
38
  chellow/e/tlms.py,sha256=M33D6YpMixu2KkwSCzDRM3kThLgShg8exp63Obo75l8,8905
39
39
  chellow/e/tnuos.py,sha256=XseYztPUsQXNKuBmystO2kzzwAG9ehCZgpGBTdgSk-A,4313
40
40
  chellow/e/triad.py,sha256=lIQj7EdUrcFwEqleuHZXYU_bfzIwNOqUVVxB3NPQt4A,13710
41
- chellow/e/views.py,sha256=gxBqMpDaQ41MHEFhx6oZ1OgeDNYu700PBeRJCNvrVAQ,215951
41
+ chellow/e/views.py,sha256=-0Ys7XVdBgFYaWWnKfRRwcVeQ7YyrHNS1HVXuFNk8wY,216190
42
42
  chellow/e/bill_parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  chellow/e/bill_parsers/activity_mop_stark_xlsx.py,sha256=UgWXDPzQkQghyj_lfgBqoSJpHB-t-qOdSaB8qY6GLog,4071
44
44
  chellow/e/bill_parsers/annual_mop_stark_xlsx.py,sha256=-HMoIfa_utXYKA44RuC0Xqv3vd2HLeQU_4P0iBUd3WA,4219
@@ -207,7 +207,7 @@ chellow/templates/e/duration_report.html,sha256=MrDgLDzbXdGLfpUbZ9U3xSP2H1VF0eK2
207
207
  chellow/templates/e/elexon.html,sha256=QW2EKdTMBTIzUkiXpYIHVZidZHNca3GmyiwWKaWkvIY,997
208
208
  chellow/templates/e/em_hh_data.html,sha256=2Ndvpo2ngO2dOpEZa05-6xRCy3IKNkWHJwW6sVjhhWY,2032
209
209
  chellow/templates/e/em_months.html,sha256=_WdOxiQ8dMEke1_nmD2yglY2zYzMx0AsaQgOw_6kDk8,6657
210
- chellow/templates/e/em_site.html,sha256=LQJ1RJe7IJCZ-dsmd-Ku3hhNEeKUq3BimEBKJPNZ-do,2890
210
+ chellow/templates/e/em_site.html,sha256=vbax2Je_DNCSWNDM0XLuvegRXNlDs71Vf4l07LCABSE,3066
211
211
  chellow/templates/e/em_totals.html,sha256=D_H12qF6b8heVeSGzcl4u7xRvtPLUtM1zWYrwEFRFTM,678
212
212
  chellow/templates/e/energisation_status.html,sha256=hvD1qMpLYjmWWGIrv-5Ko3KbRL3a6MdQXcO3Fr4_cHA,478
213
213
  chellow/templates/e/energisation_statuses.html,sha256=qwRIH7jqKA1MgajsWOeZAH89iRpOfsNW_fAqXymUQ3E,587
@@ -365,6 +365,6 @@ chellow/templates/g/supply_note_edit.html,sha256=b8mB6_ucBwoljp03iy6AgVaZUhGw3-1
365
365
  chellow/templates/g/supply_notes.html,sha256=6epNmZ3NKdXZz27fvmRUGeffg_oc1kmwuBeyRzQe3Rg,854
366
366
  chellow/templates/g/unit.html,sha256=KouNVU0-i84afANkLQ_heJ0uDfJ9H5A05PuLqb8iCN8,438
367
367
  chellow/templates/g/units.html,sha256=p5Nd-lAIboKPEOO6N451hx1bcKxMg4BDODnZ-43MmJc,441
368
- chellow-1724416862.0.0.dist-info/METADATA,sha256=KLu5Vx3wXCtMoLUmwd5ZZzWmBbXGkUYMtps6zMGue70,12241
369
- chellow-1724416862.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
370
- chellow-1724416862.0.0.dist-info/RECORD,,
368
+ chellow-1724751676.0.0.dist-info/METADATA,sha256=7AN6Q_gJi4wcmNKLFhGNag5Ra0i2ZpULKIMFyECV2OE,12241
369
+ chellow-1724751676.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
370
+ chellow-1724751676.0.0.dist-info/RECORD,,