mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
Fix iteration over form params (changed w/ addition of associations) - to handle empty values list
This commit is contained in:
@ -779,6 +779,9 @@ public class QJavalinImplementation
|
|||||||
{
|
{
|
||||||
String fieldName = formParam.getKey();
|
String fieldName = formParam.getKey();
|
||||||
List<String> values = formParam.getValue();
|
List<String> values = formParam.getValue();
|
||||||
|
|
||||||
|
if(CollectionUtils.nullSafeHasContents(values))
|
||||||
|
{
|
||||||
String value = values.get(0);
|
String value = values.get(0);
|
||||||
|
|
||||||
if("associations".equals(fieldName) && StringUtils.hasContent(value))
|
if("associations".equals(fieldName) && StringUtils.hasContent(value))
|
||||||
@ -801,8 +804,6 @@ public class QJavalinImplementation
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CollectionUtils.nullSafeHasContents(values))
|
|
||||||
{
|
|
||||||
if(StringUtils.hasContent(value))
|
if(StringUtils.hasContent(value))
|
||||||
{
|
{
|
||||||
record.setValue(fieldName, value);
|
record.setValue(fieldName, value);
|
||||||
@ -814,7 +815,6 @@ public class QJavalinImplementation
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// is this ever hit?
|
|
||||||
record.setValue(fieldName, null);
|
record.setValue(fieldName, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user