fix(plugins): Fix functions using id instead of name property
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details

This commit is contained in:
Ferdinand Thiessen 2022-03-07 14:36:31 +01:00
parent 6f35e17fba
commit 2d4c8ebfd9
1 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ class Plugin:
""" """
from ..controller import pluginController from ..controller import pluginController
return pluginController.get_setting(self.id, name, **kwargs) return pluginController.get_setting(self.name, name, **kwargs)
def set_setting(self, name: str, value): def set_setting(self, name: str, value):
"""Save setting in database """Save setting in database
@ -120,7 +120,7 @@ class Plugin:
""" """
from ..controller import pluginController from ..controller import pluginController
return pluginController.set_setting(self.id, name, value) return pluginController.set_setting(self.name, name, value)
def notify(self, user, text: str, data=None): def notify(self, user, text: str, data=None):
"""Create a new notification for an user """Create a new notification for an user
@ -136,7 +136,7 @@ class Plugin:
""" """
from ..controller import pluginController from ..controller import pluginController
return pluginController.notify(self.id, user, text, data) return pluginController.notify(self.name, user, text, data)
def serialize(self): def serialize(self):
"""Serialize a plugin into a dict """Serialize a plugin into a dict