Rewriting of a cryptic comment.
This commit is contained in:
parent
1c7df14986
commit
463985b73a
|
@ -340,10 +340,15 @@ class AbacRule(models.Model):
|
|||
predicates2 = {}
|
||||
expression = self.expression
|
||||
'''
|
||||
Pb if a predicate id is equal to value.
|
||||
The value of the predicate will be substitue with a predicate
|
||||
with that id.
|
||||
Solution: make a first substitution with unique identifiers.
|
||||
Here we substitute primary keys with the predicate description.
|
||||
|
||||
The substitution might fail if some descriptions contains
|
||||
primary keys since with an iterative substitution, a
|
||||
primary key resulting from a previsous substitution would be
|
||||
replaced by another description.
|
||||
|
||||
To prevent this we realize a two-round substitution with unique
|
||||
identifiers.
|
||||
'''
|
||||
for p in Predicate.objects.filter(rule=self):
|
||||
rdm_str = ''.join(\
|
||||
|
|
Reference in New Issue