Skip to content

Commit d5d3a3a

Browse files
committed
templates: Fixed some optional data fields
1 parent 2b1eda9 commit d5d3a3a

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

Service/TextBuilding/PersonalLogTextBuilderBase.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,35 +302,45 @@ protected bool TryGetDevice(Dictionary<string, string> data, out string device)
302302
{
303303
device = GetDevice(data);
304304

305-
return !MissingValue.Equals(device);
305+
return
306+
!string.IsNullOrWhiteSpace(device) &&
307+
!MissingValue.Equals(device);
306308
}
307309

308310
protected bool TryGetByPerson(Dictionary<string, string> data, out string byPerson)
309311
{
310312
byPerson = GetByPerson(data);
311313

312-
return !MissingValue.Equals(byPerson);
314+
return
315+
!string.IsNullOrWhiteSpace(byPerson) &&
316+
!MissingValue.Equals(byPerson);
313317
}
314318

315319
public bool TryGetDataValue(Dictionary<string, string> data, string key, out string value)
316320
{
317321
value = GetDataValue(data, key, null);
318322

319-
return !string.IsNullOrWhiteSpace(value);
323+
return
324+
!string.IsNullOrWhiteSpace(value) &&
325+
!MissingValue.Equals(value);
320326
}
321327

322328
protected bool TryGetPlatform(Dictionary<string, string> data, out string platform)
323329
{
324330
platform = GetPlatform(data);
325331

326-
return !string.IsNullOrWhiteSpace(platform);
332+
return
333+
!string.IsNullOrWhiteSpace(platform) &&
334+
!MissingValue.Equals(platform);
327335
}
328336

329337
protected bool TryGetSide(Dictionary<string, string> data, out string side)
330338
{
331339
side = GetSide(data);
332340

333-
return !string.IsNullOrWhiteSpace(side);
341+
return
342+
!string.IsNullOrWhiteSpace(side) &&
343+
!MissingValue.Equals(side);
334344
}
335345
}
336346
}

0 commit comments

Comments
 (0)