Remove unused method, fix docstring.
@@ -16,7 +16,6 @@ from __future__ import absolute_import
import copy
import mongoengine as me
-from mongoengine.queryset import Q
from st2common.persistence.action import Action
from st2common.models.db import MongoDBAccess
from st2common.models.db import stormbase
@@ -137,10 +136,9 @@ class RuleDB(stormbase.StormFoundationDB, stormbase.TagsMixin,
def _get_referenced_action_model(self, action_ref):
"""
Return Action object for the action referenced in a rule.
- Return the action model referenced from rule.
- :type rule: ``dict``
- :param rule: rule
+ :param action_ref: Action reference.
+ :type action_ref: ``str``
:rtype: ``ActionDB``
"""
@@ -153,14 +151,6 @@ class RuleDB(stormbase.StormFoundationDB, stormbase.TagsMixin,
return None
- def _get_entity(self, model_persistence, ref, query_args):
- q = Q(**query_args(ref))
-
- if q:
- return model_persistence._get_impl().model.objects(q).first()
-
- return None
-
def __init__(self, *args, **values):
super(RuleDB, self).__init__(*args, **values)
self.ref = self.get_reference().ref
