not sure what i was doing here, now checking record value correctly

This commit is contained in:
Tim Chamberlain
2023-11-30 15:45:01 -06:00
parent 4c1298d531
commit 191bcdf0dd

View File

@ -27,7 +27,6 @@ import com.kingsrook.qqq.backend.core.actions.interfaces.QActionInterface;
import com.kingsrook.qqq.backend.core.model.data.QRecord; import com.kingsrook.qqq.backend.core.model.data.QRecord;
import com.kingsrook.qqq.backend.core.model.metadata.tables.QTableMetaData; import com.kingsrook.qqq.backend.core.model.metadata.tables.QTableMetaData;
import com.kingsrook.qqq.backend.core.utils.StringUtils; import com.kingsrook.qqq.backend.core.utils.StringUtils;
import com.kingsrook.qqq.backend.core.utils.ValueUtils;
/******************************************************************************* /*******************************************************************************
@ -50,7 +49,7 @@ public abstract class AbstractMemoryAction implements QActionInterface
// always set value if boolean to overwrite is true, otherwise, // // always set value if boolean to overwrite is true, otherwise, //
// only set the value if there is currently no content for the field // // only set the value if there is currently no content for the field //
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
if(overwriteIfSet || !StringUtils.hasContent(ValueUtils.getValueAsString(table.getField(fieldName)))) if(overwriteIfSet || !StringUtils.hasContent(record.getValueString(fieldName)))
{ {
record.setValue(fieldName, value); record.setValue(fieldName, value);
} }