mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
fix NPE
This commit is contained in:
@@ -62,8 +62,8 @@ public class FeedEntriesREST extends JSONPage {
|
||||
entries.getEntries().addAll(buildEntries(subscription));
|
||||
|
||||
} else {
|
||||
FeedCategory feedCategory = feedCategoryService.findById("all"
|
||||
.equals(id) ? null : Long.valueOf(id));
|
||||
FeedCategory feedCategory = "all".equals(id) ? null
|
||||
: feedCategoryService.findById(Long.valueOf(id));
|
||||
Collection<FeedSubscription> subscriptions = "all".equals(id) ? feedSubscriptionService
|
||||
.findAll(getUser()) : feedSubscriptionService
|
||||
.findWithCategory(getUser(), feedCategory);
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.commafeed.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.EnumType;
|
||||
import javax.persistence.Enumerated;
|
||||
@@ -23,6 +24,7 @@ public class UserSettings implements Serializable {
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "user_id")
|
||||
private User user;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
|
||||
Reference in New Issue
Block a user