Skip to content

Conversation

@jose-caballero
Copy link
Contributor

@jose-caballero jose-caballero commented Jan 27, 2026

As the fields for the end of the downtimes are optional, always one of them will be left blank on the web form. StackStorm doesn't process them as an empty string, but as None. Therefore, we can not just try "strip()" on their values without checking first they are not a None one.

Description:

Special Notes:


Submitter:

Have you (where applicable):

  • Added unit tests?
  • Checked the latest commit runs on Dev?
  • Updated the example config file(s) and README?

Reviewer

Does this PR:

  • Place non-StackStorm code into the lib directory?
  • Have unit tests for the action/sensor and lib layers?
  • Have clear and obvious action parameter names and descriptions?

As the fields for the end of the downtimes are optional,
always one of them will be left blank on the web form.
StackStorm doesn't process them as an empty string, but as None.
Therefore, we can not just try "strip()" on their values without
checking first they are not a None one.
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.81%. Comparing base (dee169d) to head (15d598e).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #427   +/-   ##
=======================================
  Coverage   99.81%   99.81%           
=======================================
  Files         109      109           
  Lines        2638     2640    +2     
  Branches      329      331    +2     
=======================================
+ Hits         2633     2635    +2     
  Misses          4        4           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DavidFair DavidFair force-pushed the check_nonetype branch 2 times, most recently from b1f4865 to ace90f1 Compare January 27, 2026 12:08
Adds unit tests to ensure that None types can be handled correctly
before we try to perform string operations on them
@DavidFair
Copy link
Collaborator

@jose-caballero Are you happy with the unit tests I've added? Just so I'm not approving my own stuff

The remaining code LGTM so I'll approve that

@gmatthews20 gmatthews20 merged commit 85ab6df into main Jan 29, 2026
14 checks passed
@gmatthews20 gmatthews20 deleted the check_nonetype branch January 29, 2026 12:04
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.

4 participants