Skip to content

Commit 127e215

Browse files
authored
Merge pull request #2554 from bcgov/feat/prashanth-edit-addr-analyst-2515
Feat/prashanth edit addr analyst 2515
2 parents c0339c8 + 53970cd commit 127e215

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+989
-528
lines changed

backend/Dockerfile.openshift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,12 @@ RUN chmod +x /app/wait-for-it.sh /app/lcfs/prestart.sh /app/lcfs/start.sh
4545
# Set the APP_ENVIRONMENT variable to 'production'
4646
ENV APP_ENVIRONMENT=prod
4747

48-
CMD ["/app/lcfs/start.sh"]
48+
# CMD ["/app/lcfs/start.sh"] replaced with the following to allow for config file to be sourced
49+
CMD ["/bin/sh", "-c", "\
50+
for cfg in database redis objectstorage email rabbitmq; do \
51+
if [ -f /vault/secrets/$cfg ]; then \
52+
. /vault/secrets/$cfg; \
53+
fi; \
54+
done; \
55+
/app/lcfs/start.sh\
56+
"]

backend/lcfs/db/seeders/dev/user_role_seeder.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ async def seed_user_roles(session):
5959
{"user_profile_id": 21, "role_id": 1},
6060
{"user_profile_id": 21, "role_id": 3},
6161
{"user_profile_id": 21, "role_id": 4},
62-
{"user_profile_id": 22, "role_id": 1},
63-
{"user_profile_id": 22, "role_id": 3},
64-
{"user_profile_id": 23, "role_id": 1},
65-
{"user_profile_id": 23, "role_id": 3},
6662
]
6763

6864
try:

backend/lcfs/web/api/calculator/repo.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,7 @@ async def get_fuel_type_options(
299299
query = query.where(FuelCategory.fuel_category_id == fuel_category_id)
300300
if fuel_type_id:
301301
query = query.where(FuelType.fuel_type_id == fuel_type_id)
302-
print("Generated SQL Query:")
303-
from sqlalchemy.dialects import postgresql
304302

305-
print(
306-
query.compile(
307-
dialect=postgresql.dialect(), compile_kwargs={"literal_binds": True}
308-
)
309-
)
310303
fuel_type_results = (await self.db.execute(query)).all()
311304

312305
return {

backend/lcfs/web/api/compliance_report/summary_repo.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ async def get_previous_summary(
144144
)
145145
.limit(1)
146146
)
147-
return result.scalars().first().summary
147+
previous_report = result.scalars().first()
148+
if previous_report is not None:
149+
return previous_report.summary
150+
return None
148151

149152
@repo_handler
150153
async def get_transferred_out_compliance_units(
@@ -213,13 +216,17 @@ def aggregate_quantities(
213216
and record.fuel_type.fossil_derived == fossil_derived
214217
):
215218
fuel_category = self._format_category(record.fuel_category.category)
216-
fuel_quantities[fuel_category] += record.quantity
219+
fuel_quantities[fuel_category] = fuel_quantities.get(
220+
fuel_category, 0
221+
) + (record.quantity or 0)
217222
elif (
218223
isinstance(record, OtherUses)
219224
and record.fuel_type.fossil_derived == fossil_derived
220225
):
221226
fuel_category = self._format_category(record.fuel_category.category)
222-
fuel_quantities[fuel_category] += record.quantity_supplied
227+
fuel_quantities[fuel_category] = fuel_quantities.get(
228+
fuel_category, 0
229+
) + (record.quantity_supplied or 0)
223230

224231
return dict(fuel_quantities)
225232

frontend/cypress.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ const { Client } = pg
99

1010
export default defineConfig({
1111
e2e: {
12+
supportFile: 'cypress/support/e2e.js',
13+
testIsolation: false,
1214
specPattern: ['**/*.feature', '**/*.cy.js'],
15+
excludeSpecPattern: ['**/*.skip.feature'],
1316
screenshotsFolder: 'cypress/screenshots',
1417
videosFolder: 'cypress/videos',
1518
// Global configurations

0 commit comments

Comments
 (0)