Skip to content

Commit

Permalink
#639 Fix NPE
Browse files Browse the repository at this point in the history
#639 Can't save a new partner
  • Loading branch information
cristinamghita committed Oct 20, 2017
1 parent 0094137 commit 9e2d974
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 9e2d974

Please sign in to comment.