Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when attempting access something on the related_name. #17

Closed
kitsunde opened this issue Feb 21, 2013 · 7 comments
Closed

Exception when attempting access something on the related_name. #17

kitsunde opened this issue Feb 21, 2013 · 7 comments
Labels

Comments

@kitsunde
Copy link

I have something like this:

class Profile(models.Model):
    user = models.OneToOneField('auth.User')

class Entry(models.Model):
    user = models.ForeignKey('accounts.Profile')

class EntryResource(resources.ModelResource):
    class Meta:
        model = Entry
        fields = ('user__profile',)

Which causes: 'RelatedObject' object has no attribute 'get_internal_type' I've resorted to custom fields with dehydrate.

@bmihelac
Copy link
Member

Thanks for report, I would check this soon.

@geeknam
Copy link
Contributor

geeknam commented Feb 21, 2013

I had the same issue, fixed it in my fork :)

Sent from Galaxy Nexus
On 21 Feb 2013 18:11, "Bojan Mihelac" notifications@github.com wrote:

Thanks for report, I would check this soon.


Reply to this email directly or view it on GitHubhttps://github.com/bmihelac/django-import-export/issues/17#issuecomment-13883894.

@bmihelac
Copy link
Member

Great, is this a commit that fixes this issue:

bmihelac@79afdfd

@geeknam
Copy link
Contributor

geeknam commented Feb 21, 2013

Way back, there only is only one if statement added. Sorry cant help much,
Im on my phone now.

Sent from Galaxy Nexus
On 21 Feb 2013 18:16, "Bojan Mihelac" notifications@github.com wrote:

Great, is this a commit that fixes this issue:

79afdfdhttps://github.com/bmihelac/django-import-export/commit/79afdfd571dc173a71bb6ad4680832d6cdd956c3


Reply to this email directly or view it on GitHubhttps://github.com/bmihelac/django-import-export/issues/17#issuecomment-13884072.

@bmihelac
Copy link
Member

no problem. If you have time to see which was the statement for this during today or tomorrow, I will be glad to avoid doing any work :)

@geeknam
Copy link
Contributor

geeknam commented Feb 27, 2013

This commit: geeknam@907d083

bmihelac added a commit that referenced this issue Mar 1, 2013
FIX #17 - Exception when attempting access something on the related_name...
@bmihelac
Copy link
Member

bmihelac commented Mar 1, 2013

@CelC, OneToOne field support is added. Please let me know if you experience any issue with this.

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

No branches or pull requests

3 participants