opened
bethanyaconnor
username_0
This is
1. much cleaner
2. fixes a bug where the fake key would get sent back to the server preventing the lesson from being saved ([slack thread](https://codedotorg.slack.com/archives/CNZP84FJ5/p1608162502019700?thread_ts=1608156821.014200&cid=CNZP84FJ5))

<!-- ### Background -->
<!-- ### Privacy -->
<!--
1.	Does the Project involve the collection, use or sharing of new Personal Data?

2.	Does the Project involve a new or changed use or sharing of existing Personal Data?
-->
<!-- ### Security -->
<!--
Link to Jira Task where sensitive security issues are discussed privately.
-->
<!-- ### Caching -->
<!-- ### Deployment strategy -->
<!-- ### Future work -->

## Links

<!--
  Any relevant links to external resources; ie, specification documents, jira
  items, related PRs, honeybadger errors, etc
-->

- [spec]()
- [jira]()

## Testing story

<!--
  Does your change include appropriate tests?

  If so, please describe how the tests included in this PR are sufficient

  If not, please explain why this change does not need to be tested.
-->

# Reviewer Checklist:

- [ ] Tests provide adequate coverage
- [ ] Privacy and Security impacts have been assessed
- [ ] Code is well-commented
- [ ] New features are translatable or updates will not break translations
- [ ] Relevant documentation has been added or updated
- [ ] User impact is well-understood and desirable
- [ ] Pull Request is labeled appropriately
- [ ] Follow-up work items (including potential tech debt) are tracked and linked
Use objective key to identify objectives
issue
created
davidsbailey
username_1
I'm not totally sure I understand what's going on here. is the key generated by the client being used as the key on the server?
comment
created
davidsbailey
username_1
OK, I caught up on the slack thread and see what's going on now. this looks like a good fix. thanks for getting to the bottom of this!
comment
created
bethanyaconnor
username_0
Yeah, the key wasn't being used on the server but was being passed back in `originalLessonData` as it was edited server-side.

I agree that it would be good to have an end-to-end test on editing an entirely populated lesson to try to catch things like this. I'll add something to our backlog
comment
created
davidsbailey
username_1
I think just adding some objectives (and other curriculum object types) to `TestController#create_migrated_script` would cover this
comment