Skip to content

Commit ae6ae46

Browse files
authored
Merge pull request #65 from FlowFuse/64-fix-owner-determination
Better determination of device owner
2 parents 2b70c7a + 9dbe026 commit ae6ae46

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nodes/project-link.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ module.exports = function (RED) {
1616
const API_VERSION = 'v1'
1717
const TOPIC_HEADER = 'ff'
1818
const TOPIC_VERSION = 'v1'
19-
const OWNER_TYPE = RED.settings.flowforge.applicationID ? 'application' : 'instance'
19+
// It is not unreasonable to expect `projectID` and `applicationID` are set for an instance
20+
// owned device, however an application owned device should not have a projectID.
21+
// therefore, assume project owned if `projectID` is set
22+
const OWNER_TYPE = RED.settings.flowforge.projectID ? 'instance' : 'application'
2023

2124
// #region JSDoc
2225

0 commit comments

Comments
 (0)