From 76d87b7fb51dfab8f85686bde7fed67701bc9092 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sat, 18 Sep 2010 08:15:36 +0400 Subject: s4 upgradeprovision: fix a bug with empty reference objects Thanks to lukas@eecs.qmul.ac.uk for poiting it to me --- source4/scripting/bin/upgradeprovision | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source4/scripting') diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision index 3c02569ba3..7dda6b67a6 100755 --- a/source4/scripting/bin/upgradeprovision +++ b/source4/scripting/bin/upgradeprovision @@ -852,8 +852,16 @@ def update_present(ref_samdb, samdb, basedn, listPresent, usns, invocationid): # We have updated by provision usn information so let's exploit # replMetadataProperties if att in forwardlinked: + if current[0].get(): + curval = current[0][att] + else: + curval = () + if reference[0].get(): + refval = reference[0][att] + else: + refval = () handle_links(samdb, att, basedn, current[0]["dn"], - current[0][att], reference[0][att], delta) + curval, refval, delta) if isFirst == 0 and len(delta.items())>1: isFirst = 1 -- cgit