Skip to content

Fix logically impossible condition in updateTEViewData when TechId an…#414

Open
mohityadav8 wants to merge 1 commit intoEAPD-DRB:mainfrom
mohityadav8:fix-updateTEViewData-condition
Open

Fix logically impossible condition in updateTEViewData when TechId an…#414
mohityadav8 wants to merge 1 commit intoEAPD-DRB:mainfrom
mohityadav8:fix-updateTEViewData-condition

Conversation

@mohityadav8
Copy link
Copy Markdown

@mohityadav8 mohityadav8 commented Apr 4, 2026

…d EmisId are both provided

Linked issue

Existing related work reviewed

  • Issues/PRs reviewed: None found after search

Overlap assessment

  • Classification: Bug fix
  • Overlapping items: None identified
  • Why this is not duplicate/superseded: No existing issue or PR addresses the logically impossible condition in updateTEViewData().

Why this PR should proceed

  • Fixes a logic error that prevents updates when both TechId and EmisId are provided.
  • Ensures the update operation correctly modifies the JSON structure.
  • Prevents silent failure where values were never written.

Summary

  • What changed:

    • Replaced a logically impossible condition where a single key k was compared against both TechId and EmisId.
    • Updated the logic to correctly treat TechId and EmisId as nested keys in the JSON structure.
  • Why:

    • A single dictionary key cannot equal two different values simultaneously.
    • The previous condition always evaluated to False when both parameters were provided, preventing the update from executing.

Validation

  • Tests added/updated (or not applicable)
  • Validation steps documented
  • Evidence attached (logs/screenshots/output as relevant)

Documentation

  • Docs updated in this PR (or not applicable)
  • Any setup/workflow changes reflected in repo docs

Scope check

  • No unrelated refactors
  • Implemented from a feature branch
  • Change is deliverable without upstream OSeMOSYS/MUIO dependency
  • Base repo/branch is EAPD-DRB/MUIOGO:main (not upstream)

Exception rationale

  • Only for narrow docs/typo PRs that do not use a linked issue.
  • Leave blank otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Logically impossible condition in updateTEViewData() prevents data updates

1 participant