Skip to content

Commit 503cda0

Browse files
author
Jareth Hein
committed
Code cleanups for readability, bugfix: add in check to allow updating of previously null column values
1 parent 67dd725 commit 503cda0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Intuit.QuickBase.Client/IQRecord.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public interface IQRecord
2727

2828
internal interface IQRecord_int
2929
{
30-
void ForceUpdateState(int RecordId);
30+
void ForceUpdateState(int recId);
3131
void ForceUpdateState();
3232
int GetColumnIndex(string colName);
3333
}

Intuit.QuickBase.Client/QRecord.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public void AcceptChanges()
152152
{
153153
foreach (var field in _fields)
154154
{
155-
if (field.Column.ColumnLookup == true) continue; //don't try to update values that are results of lookups
155+
if (field.Column.ColumnLookup) continue; //don't try to update values that are results of lookups
156156
if (field.Update)
157157
{
158158
IField qField = new Field(field.FieldId, field.Type, field.QBValue);
@@ -172,7 +172,7 @@ public void AcceptChanges()
172172
{
173173
foreach (var field in _fields)
174174
{
175-
if (field.Column.ColumnLookup == true) continue; //don't try to update values that are results of lookups
175+
if (field.Column.ColumnLookup) continue; //don't try to update values that are results of lookups
176176
IField qField = new Field(field.FieldId, field.Type, field.QBValue);
177177
if (field.Type == FieldType.file)
178178
{
@@ -219,9 +219,9 @@ private string CSVQuoter(string inStr)
219219
return inStr;
220220
}
221221

222-
public void ForceUpdateState(int RecID)
222+
public void ForceUpdateState(int recId)
223223
{
224-
RecordId = RecID;
224+
RecordId = recId;
225225
}
226226

227227
public void ForceUpdateState()
@@ -345,7 +345,7 @@ private void SetExistingField(int index, int fieldIndex, object value)
345345
}
346346
else
347347
{
348-
if (!_fields[fieldIndex].Value.Equals(value))
348+
if (_fields[fieldIndex].Value == null || !_fields[fieldIndex].Value.Equals(value))
349349
{
350350
_fields[fieldIndex].Value = value;
351351
if (RecordState != RecordState.New)

0 commit comments

Comments
 (0)