Unverified Commit 81832083 authored by Tao Feng's avatar Tao Feng Committed by GitHub

Add role_name to user ES doc (#232)

parent 8df12d0a
...@@ -15,6 +15,7 @@ class UserESDocument(ElasticsearchDocument): ...@@ -15,6 +15,7 @@ class UserESDocument(ElasticsearchDocument):
employee_type, # type: str employee_type, # type: str
manager_email, # type: str manager_email, # type: str
slack_id, # type: str slack_id, # type: str
role_name, # type: str
is_active, # type: bool is_active, # type: bool
total_read, # type: int total_read, # type: int
total_own, # type: int total_own, # type: int
...@@ -30,6 +31,7 @@ class UserESDocument(ElasticsearchDocument): ...@@ -30,6 +31,7 @@ class UserESDocument(ElasticsearchDocument):
self.employee_type = employee_type self.employee_type = employee_type
self.manager_email = manager_email self.manager_email = manager_email
self.slack_id = slack_id self.slack_id = slack_id
self.role_name = role_name
self.is_active = is_active self.is_active = is_active
self.total_read = total_read self.total_read = total_read
self.total_own = total_own self.total_own = total_own
......
...@@ -2,7 +2,7 @@ import os ...@@ -2,7 +2,7 @@ import os
from setuptools import setup, find_packages from setuptools import setup, find_packages
__version__ = '2.4.2' __version__ = '2.4.3'
requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt') requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt')
with open(requirements_path) as requirements_file: with open(requirements_path) as requirements_file:
......
...@@ -20,6 +20,7 @@ class TestUserElasticsearchDocument(unittest.TestCase): ...@@ -20,6 +20,7 @@ class TestUserElasticsearchDocument(unittest.TestCase):
employee_type='fte', employee_type='fte',
manager_email='test_manager', manager_email='test_manager',
slack_id='test_slack', slack_id='test_slack',
role_name='role_name',
is_active=True, is_active=True,
total_read=2, total_read=2,
total_own=3, total_own=3,
...@@ -34,6 +35,7 @@ class TestUserElasticsearchDocument(unittest.TestCase): ...@@ -34,6 +35,7 @@ class TestUserElasticsearchDocument(unittest.TestCase):
"is_active": True, "is_active": True,
"total_own": 3, "total_own": 3,
"slack_id": 'test_slack', "slack_id": 'test_slack',
"role_name": 'role_name',
"manager_email": "test_manager", "manager_email": "test_manager",
'github_username': "github_user", 'github_username': "github_user",
"employee_type": 'fte', "employee_type": 'fte',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment