Skip to content

Commit

Permalink
Stripping port-info from PayPalNVP ipaddress field
Browse files Browse the repository at this point in the history
This is necessary to avoid errors from postgres backends.
  • Loading branch information
chrischambers committed Sep 19, 2010
1 parent f22c34a commit 3066b39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paypal/pro/models.py
Expand Up @@ -59,7 +59,7 @@ class Meta:

def init(self, request, paypal_request, paypal_response):
"""Initialize a PayPalNVP instance from a HttpRequest."""
self.ipaddress = request.META.get('REMOTE_ADDR', '')
self.ipaddress = request.META.get('REMOTE_ADDR', '').split(':')[0]
if hasattr(request, "user") and request.user.is_authenticated():
self.user = request.user

Expand Down

0 comments on commit 3066b39

Please sign in to comment.