Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Epic 1070 #156

Merged
merged 3 commits into from
Jun 8, 2017
Merged

Epic 1070 #156

merged 3 commits into from
Jun 8, 2017

Conversation

logancodes
Copy link
Contributor

@marklise the reason I changed $scope.project.directoryStructure to scope.node.model is because scope.project.directoryStructure does not get updated with newly created folders. But scope.model.node gets updated with the new folder in it. I can see data duplication staying in the scope (i.e $scope.project.directoryStructure and scope.node.model holds the same data). Please let me know if you have any concerns about this issue.

@logancodes logancodes requested a review from marklise June 8, 2017 00:01
Copy link
Contributor

@marklise marklise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, provided that the node.model object is in fact the most recent version of the directoryStructure (it should reflect what /api/project/:project/directory/list returns). I say this because it's possible to manipulate the client side structure without persisting the model to the back-end. This bug looks to have happened because of the client code not updating the directoryStructure object in the event of a change to the structure.

@marklise marklise merged commit 682b904 into bcgov:master Jun 8, 2017
@bryan-gilbert
Copy link
Contributor

I think we should remove scope.project.directoryStructure or else put a big comment in the code to say this object does not get updated when changes are made to the underlying directory structure.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants