# Incomplete model when a topic has just been created

**URL:** https://meta.discourse.org/t/incomplete-model-when-a-topic-has-just-been-created/66716
**Category:** Development
**Created:** [July 24, 2017, 12:40pm UTC](https://meta.discourse.org/t/incomplete-model-when-a-topic-has-just-been-created/66716 "2017-07-24T12:40:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jack2](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jack2](https://meta.discourse.org/u/jack2)
#### Post date: [July 24, 2017, 12:40pm UTC](https://meta.discourse.org/t/incomplete-model-when-a-topic-has-just-been-created/66716/1 "2017-07-24T12:40:47Z")

</div>

From the `didTransition` hook of a `topic.*` route, I access the parent’s model with `this.modelFor('topic')`.

This works very well, except in one case: when the topic **has just been created** (with the API), the model I get from `modelFor` is incomplete. For example, it has the `id` property, but not the `tags` property. The complete model becomes available a moment later.

Which hook should I use to get the complete model?

---

<div class="post-metadata">

### Author: ![jack2](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jack2](https://meta.discourse.org/u/jack2)
#### Post date: [August 18, 2017, 5:18pm UTC](https://meta.discourse.org/t/incomplete-model-when-a-topic-has-just-been-created/66716/2 "2017-08-18T17:18:14Z")

</div>

I get the same problem when creating a topic by hand.

Here is what I do:

1. I create a topic manually in Discourse (using the composer).
2. I intercept the resulting route change from the `didTransition` hook (or from `willTransition` + I wait for the active transition promise to resolve).
3. I use `this.modelFor('topic')` → the `tags` field is not there (unless I wait more than 1 second), whereas the `id` field is.

I obviously use an inappropriate hook. Any hint?

---

<div class="post-metadata">

### Author: ![jack2](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jack2](https://meta.discourse.org/u/jack2)
#### Post date: [September 15, 2017, 1:10pm UTC](https://meta.discourse.org/t/incomplete-model-when-a-topic-has-just-been-created/66716/3 "2017-09-15T13:10:57Z")

</div>

I ended retrying every 500 ms until I get the `tags` field.
