Commits

Jony Kalavera committed 5c5d0a6 Merge

Comments (0)

Files changed (2)

trato_hecho/trade/models.py

         graph = GraphAPI(oauth_token = token)
         domain = Site.objects.get_current()
         url = "http://%s%s" %( domain.domain,self.get_absolute_url())
-        method = "me/%s:Offer" % settings.FACEBOOK_APPLICATION_NAMESPACE
+        method = "me/%s:offer" % settings.FACEBOOK_APPLICATION_NAMESPACE
         graph.post(path=method, item=url)
 
     def get_active_offers(self):

trato_hecho/trade/views.py

         return redirect(reverse('offer_detail', args=[related_offers[0].pk]))
     suggestions , is_owner = [], False
     template = 'tradeitem/item_detail.html'
-    if item.owner == request.facebook.user:
+    if request.facebook and item.owner == request.facebook.user:
         is_owner=True
         search_terms = item.tradeable_for.values_list('name', flat=True)
         if search_terms: