Skip to content

Commit 39fd83a

Browse files
authored
Merge pull request #1810 from dinger1986/dinger1986-add-mesh-coname-to-initial
Update views.py
2 parents 0528ecb + a23d811 commit 39fd83a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

api/tacticalrmm/clients/tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def test_add_client(self):
8888
"client": {"name": "Setup Client"},
8989
"site": {"name": "Setup Site"},
9090
"timezone": "America/Los_Angeles",
91+
"companyname": "TestCo Inc.",
9192
"initialsetup": True,
9293
}
9394
r = self.client.post(url, payload, format="json")

api/tacticalrmm/clients/views.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ def post(self, request):
9292
if "initialsetup" in request.data.keys():
9393
core = get_core_settings()
9494
core.default_time_zone = request.data["timezone"]
95-
core.save(update_fields=["default_time_zone"])
95+
core.mesh_company_name = request.data["companyname"]
96+
core.save(update_fields=["default_time_zone", "mesh_company_name"])
9697

9798
# save custom fields
9899
if "custom_fields" in request.data.keys():

0 commit comments

Comments
 (0)