Skip to content

🪲 BUG-#129: Fix task_id=0 being treated as falsy and overwritten with None - #151

Merged
FernandoCelmer merged 3 commits into
developfrom
feature/129
Apr 7, 2026
Merged

🪲 BUG-#129: Fix task_id=0 being treated as falsy and overwritten with None#151
FernandoCelmer merged 3 commits into
developfrom
feature/129

Conversation

@FernandoCelmer

@FernandoCelmer FernandoCelmer commented Apr 6, 2026

Copy link
Copy Markdown
Member

Description

  • dotflow/core/context.py: Fix task_id setter to only accept int values, removing the unsafe fallback that treated 0 as falsy

Motivation and Context

The original setter used if not self.task_id: which evaluated not 0 as True, causing task_id=0 (the first task in every workflow) to be vulnerable to overwrite with None. The fix removes the fallback entirely — only isinstance(value, int) is checked, ensuring type safety and correct handling of task_id=0.

Closes #129

Types of changes

  • Bug fix (change that fixes an issue)
  • New feature (change which adds functionality)
  • Documentation

Checklist

  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the CHANGELOG
  • I have updated the documentation accordingly

@FernandoCelmer FernandoCelmer added bug Something isn't working critical Critical severity - must fix labels Apr 6, 2026
@FernandoCelmer FernandoCelmer self-assigned this Apr 6, 2026
@FernandoCelmer
FernandoCelmer deleted the feature/129 branch April 7, 2026 02:00
@FernandoCelmer
FernandoCelmer restored the feature/129 branch April 7, 2026 02:02
@FernandoCelmer FernandoCelmer reopened this Apr 7, 2026
@FernandoCelmer
FernandoCelmer merged commit e58e06b into develop Apr 7, 2026
20 checks passed
@FernandoCelmer
FernandoCelmer deleted the feature/129 branch April 7, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working critical Critical severity - must fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant