#8092 REST API for User Activity does not work due to missing attribute

v1.5.0
closed
api (16)
General
2016-07-11
2016-06-20
Rohan Verma
No

Eg. https://forge-allura.apache.org/rest/u/brondsem/activity returns 500

This is due to line 227 since shortname attribute is not set for Profile tool. What should I do to solve it?

I'm not sure what needs to be done.

 'following': data['following'],
                   'followee': {
                       'activity_name': data['followee'].shortname,
                       'activity_url': data['followee'].url(),
                       'activity_extras': {},

Related

Git: cd49782a
Tickets: #8092

Discussion

  • Dave Brondsema

    Dave Brondsema - 2016-06-21

    Actually the error I see is slightly different, looks like the User object is what is missing shortname

    File '/var/local/allura/ForgeActivity/forgeactivity/main.py', line 227 in index
      'activity_name': data['followee'].shortname,
    AttributeError: 'User' object has no attribute 'shortname'
    

    Comparing to other places that use _get_activities_data results, I'm gussing activity_name would be better to use instead of shortname.

     
  • Dave Brondsema

    Dave Brondsema - 2016-07-11
    • status: review --> closed
    • Reviewer: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2016-08-22
    • Milestone: unreleased --> v1.5.0
     

Log in to post a comment.