ISEPOS-2325 Fix 'NoneType' object is not iterable #1

Merged
mieszkomakuch merged 3 commits from bugfix/ISEPOS-2325-fix-nontype-object-bug into master 2025-03-24 14:32:28 +01:00
Showing only changes of commit 14182b79e6 - Show all commits

View File

@ -37,7 +37,7 @@ def main(argv):
parser.add_argument("--G", help="Shear modulus of reservoir (in Pa).", type=float, default=35000000000)
parser.add_argument("--ssd", help="Static stress drop (in Pa).", type=float, default=3000000)
parser.add_argument("--C", help="Geometrical constant.", type=float, default=0.95)
parser.add_argument("--b_value_type", help="b-value type: parameter of type 'TEXT'", action='append', default="b")
parser.add_argument("--b_value_type", help="b-value type: parameter of type 'TEXT'", action='append')
Outdated
Review

With this setting, if you don't check any of the options in the interface, the app gets executed properly, but for the user it looks like it was without any b option selected, while underneath something is selected, and the user doesn't know about it. I wouldn't set this option here, and let the error be comunicated from the app (that nothing was selected). In this way we'll be consistent with what is shown in the interface.
Then, to avoid the error altogether, in the interface we should validate the field to ensure something is selected.

With this setting, if you don't check any of the options in the interface, the app gets executed properly, but for the user it looks like it was without any b option selected, while underneath something is selected, and the user doesn't know about it. I wouldn't set this option here, and let the error be comunicated from the app (that nothing was selected). In this way we'll be consistent with what is shown in the interface. Then, to avoid the error altogether, in the interface we should validate the field to ensure something is selected.

Ok, I removed default value from maxmagnitude_wrapper.py and I will add validation to form field

Ok, I removed default value from `maxmagnitude_wrapper.py` and I will add validation to form field
parser.add_argument("--cl", help="Confidence level in van der Elst model.", type=float, action='append')
parser.add_argument("--mag_name", help="Magnitude column name", type=str)