Skip to content

Commit

Permalink
Merge pull request #23885 from code-dot-org/revert-23820-remove-refs-…
Browse files Browse the repository at this point in the history
…to-migratedToS3

Revert "Projects: Remove references to migratedToS3"
  • Loading branch information
Erin007 committed Jul 24, 2018
2 parents 94088ec + 440f08d commit 2403420
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/src/code-studio/initApp/project.js
Expand Up @@ -849,6 +849,7 @@ var projects = module.exports = {
}
currentSourceVersionId = response.versionId;
replaceCurrentSourceVersion = true;
current.migratedToS3 = true;

this.updateChannels_(callback);
}.bind(this));
Expand Down Expand Up @@ -893,6 +894,7 @@ var projects = module.exports = {
name: "New Project",
}, (err, channelData) => {
sources.put(channelData.id, JSON.stringify({ source }), SOURCE_FILE, (err, sourceData) => {
channelData.migratedToS3 = true;
channels.update(channelData.id, channelData, (err, finalChannelData) => {
executeCallback(callback, finalChannelData);
});
Expand Down Expand Up @@ -1305,7 +1307,7 @@ function fetchSource(channelData, callback, version, useSourcesApi) {
current = channelData;

projects.setTitle(current.name);
if (useSourcesApi) {
if (useSourcesApi && channelData.migratedToS3) {
var url = current.id + '/' + SOURCE_FILE;
if (version) {
url += '?version=' + version;
Expand Down

0 comments on commit 2403420

Please sign in to comment.