The summary value was set to invalid primary key - automount map
instead of automount key.

https://fedorahosted.org/freeipa/ticket/1524

>From 7384cb11979a33adb52874baee7dcf264b1d3570 Mon Sep 17 00:00:00 2001
From: Martin Kosek <mko...@redhat.com>
Date: Wed, 27 Jul 2011 11:24:04 +0200
Subject: [PATCH] Fix automountkey-add summary

The summary value was set to invalid primary key - automount map
instead of automount key.

https://fedorahosted.org/freeipa/ticket/1524
---
 ipalib/plugins/automount.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py
index d692b2c866f787f46623abb01dad87e560a9c797..59d20eceeb6e1892b1835b95048e760063f47f4c 100644
--- a/ipalib/plugins/automount.py
+++ b/ipalib/plugins/automount.py
@@ -761,7 +761,9 @@ class automountkey_add(LDAPCreate):
         else:
             options[self.obj.primary_key.name] = self.obj.get_pk(key, None)
         options['add_operation'] = True
-        return super(automountkey_add, self).execute(*keys, **options)
+        result = super(automountkey_add, self).execute(*keys, **options)
+        result['value'] = key   # Fix returned primary key
+        return result
 
 api.register(automountkey_add)
 
-- 
1.7.6

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to