Skip to content

Commit

Permalink
Merge pull request #640 from metasfresh/gh639
Browse files Browse the repository at this point in the history
#639 Fix NPE
  • Loading branch information
teosarca authored Oct 20, 2017
2 parents 0094137 + 9e2d974 commit addf0f4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,9 @@ private static final void saveLabels(final Document document, final IDocumentFie
final int linkId = document.getFieldView(lookup.getLinkColumnName()).getValueAsInt(-1);
final Set<Object> listValuesInDatabase = lookup.retrieveExistingValues(linkId).getKeys();

final Set<Object> listValuesToSave = new HashSet<>(documentField.getValueAs(LookupValuesList.class).getKeys());

final LookupValuesList lookupValuesList = documentField.getValueAs(LookupValuesList.class);
final Set<Object> listValuesToSave = lookupValuesList != null ? new HashSet<>(lookupValuesList.getKeys()) : new HashSet<>();

//
// Delete removed labels
{
Expand Down

0 comments on commit addf0f4

Please sign in to comment.