mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
Make primary_key optional.
The pwpolicy plugin doesn't have a primary key but can still take advantage of other parts of the framework.
This commit is contained in:
parent
48785a5af1
commit
97dfa586de
@ -29,7 +29,8 @@ class Create(frontend.Method):
|
||||
"""
|
||||
|
||||
def get_args(self):
|
||||
yield self.obj.primary_key.clone(attribute=True)
|
||||
if self.obj.primary_key:
|
||||
yield self.obj.primary_key.clone(attribute=True)
|
||||
|
||||
def get_options(self):
|
||||
if self.extra_options_first:
|
||||
@ -48,7 +49,8 @@ class PKQuery(frontend.Method):
|
||||
"""
|
||||
|
||||
def get_args(self):
|
||||
yield self.obj.primary_key.clone(attribute=True, query=True)
|
||||
if self.obj.primary_key:
|
||||
yield self.obj.primary_key.clone(attribute=True, query=True)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user